extensions/amp-story/1.0/_locales/README.md
To see a list of the supported languages, see the list of *.json files in the _locales directory.
Languages will fall back to their more general variants, and ultimately to the default language. Variants are indicated by a hyphen in the language code.
For example, the language code en-GB will check the following languages (in this order):
en-GB (English, Great Britain)en (English)default (Default)The default language code is a fallback used in the case that the publisher-specified language code does not exist. It uses a minimal amount of English strings, so that the document can be displayed mostly in its primary language. Any labels that describe otherwise familiar or intelligible iconography can be dropped entirely. For example, since sharing icons show the sharing network's logo (e.g. the Twitter logo), the "Twitter" string is redundant and can be left out of the default language.
You can view the translations provided for each language in this spreadsheet. Any cells with the text undefined mean that the string will not be shown in the specified language, and fallback language(s) will be used instead.
LocalizedStringId. Keep the LocalizedStringId list in alphabetical order, and make sure your ID's name is clear about what it represents semantically.en.json fileLocalizedStringId as the key, and an object containing the string and its description as its value. For example:/* ... */
[LocalizedStringId.MY_LOCALIZED_STRING_ID]: {
string: 'My string',
description: 'This is a description of my string, explaining what it means and/or how it is used.',
},
/* ... */
*.json file from the _locales directory for the language for which you would like to add a translation.LocalizedStringId as the key, and an object containing the string as its value. For example:/* ... */
[LocalizedStringId.MY_LOCALIZED_STRING_ID]: {
string: 'My string',
},
/* ... */
NOTE: Keep string IDs in alphabetical order, and do not include the description key in your string object for languages other than English.