l10n
Control display labels of languages in language picker.
Options
Option | Type | Description |
---|---|---|
defaultLocale | string | REQUIRED Name of the default locale (the language of the files outside of the @l10n folder). |
locales | Locale object | List of all locales, including the default locale |
Locale object
Option | Type | Description |
---|---|---|
code | string | Language 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 ; |
name | string | Language 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
- Arabichi
- Hindide
- Germanes
- Spanishfr
- Frenchit
- Italianja
- Japaneseko
- Koreanpl
- Polishpt
- Portuguese (Portugal)pt-BR
- Portuguese (Brazil)ru
- Russianuk
- Ukrainianzh
- Chinese (Simplified)
Resources
- Configure language support for your project by following the steps in the Configure internationalization how-to documentation.