Skip to content

internationalization

Ali Naqvi edited this page Jun 16, 2022 · 1 revision

For OSM documentation to support multiple languages side by side, we are proposing a Translation by content directory approach for documentation content translation. In this approach, each supported language will have its contents in a separate directory named using lowercased language code

Examples:

  • en: English
  • zh: Chinese
  • fr: French
  • jp: Japanese

Please follow the guide Adding release-specific docs for adding release-specific documentation

Adding a new regional language

  1. Copy content/en folder into a folder named after language code. For example to add Chinese language translation, create a new folder named content/zh, copy the contents and proceed with translation.
  2. Update languages section in config.toml and add new language settings.
  3. Add language-specific toml document under themes/dosmy/i18n

Add/Update document

Newly added or updated documents will need to be copied to all available regional languages folders and require translation into supported languages.

New document

After you have finished writing your English document, manually copy the document into the directory for each language and create issues for translations in other languages. At this point, statically compiled documents in other languages will display the English content. When the translation is complete, the translation of the response is displayed.

Documentation website navigation panel contents are populated from the selected language folder. So if documents are added to only a specific language folder, they will only be displayed for that particular language.

Update document

After updating the English document, create issues for translations in other languages. Documents in other languages will show English content until the translation is complete.

Clone this wiki locally