# localization

    .localization name:{String} \
                 merge:{Boolean = false} \
              contents:{Map<String, Dictionary<Any>>}
    -> Void

Content copied to clipboard

Defines and registers a new localization table, whose entries are key-value pairs for each locale and defined by a Markdown dictionary.

    .localization {mytable}
        - English
            - morning: Good morning
            - evening: Good evening
        - Italian
            - morning: Buongiorno
            - evening: Buonasera

Content copied to clipboard

The localization entries can then be accessed via the localize function, after setting the document language via docLanguage:

    .doclang {English}

    .localize {mytable:morning} <!-- Good morning -->

Content copied to clipboard

If merge is set to true, it can be used to expand an existing localization table.

Example, extending stdlib's localization table:

    .doclang {fr-CA}

    .localization {std} merge:{true}
       - fr-CA
           - warning: Avertissement

    .box type:{warning}
        Box content

Content copied to clipboard

In this example, the warning box will automatically feature the "Avertissement" title, since the `std:warning` localization key is accessed by the `.box` function.

#### Parameters

name

name of the localization table. Must be unique if merge is false.

merge

- Optional
- Likely named

if enabled and a table with the same name already exists, the two tables will be merged, with higher priority to the new one

contents

- Likely a body argument

dictionary of locales and their key-value entries

#### Throws

IllegalArgumentException

if the contents are not in the correct format, or if the table name is already defined and merge is false

#### Wiki page

localization