Last updated

l10n

Control display labels of languages in language picker.

Options

OptionTypeDescription
defaultLocalestringREQUIRED Name of the default locale (the language of the files outside of the @l10n folder).
localesLocale objectList of all locales, including the default locale

Locale object

OptionTypeDescription
codestringLanguage code. Must match the name of the language subfolder inside the @l10n folder or the defaultLocale code.
namestringLanguage name that is displayed in the language picker.

Examples

Set up a site in French with Dutch and UK English options:

redocly.yaml
l10n:
  defaultLocale: fr-FR
  locales:
    - code: nl-NL
      name: Dutch
    - code: en-GB
      name: English
    - code: fr-FR
      name: French 

With this setup, the directory structure should be as follows:

your-awesome-project
└── @l10n
    ├── fr-FR
    ├── nl-NL
    └── en-GB

Resources