Skip to content
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. The format of the code is lang-COUNTRY or lang, where lang is the language code and COUNTRY is the country code. For example, en-US for English (United States) and fr-FR for French (France), or en for English. More specific fallback locales are supported, for example de-AT falls back to de;
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

Supported default translations

Redocly provides default translations for the following languages:

  • en - English (United States)
  • ar - Arabic
  • hi - Hindi
  • de - German
  • es - Spanish
  • fr - French
  • it - Italian
  • ja - Japanese
  • ko - Korean
  • pl - Polish
  • pt - Portuguese (Portugal)
  • pt-BR - Portuguese (Brazil)
  • ru - Russian
  • uk - Ukrainian
  • zh - Chinese (Simplified)

Resources