openservicemesh / osm-docs

a docs page for open service mesh
https://docs.openservicemesh.io
Apache License 2.0
4 stars 40 forks source link

[Proposal] Add internationalization support for osm docs #401

Closed addozhang closed 2 years ago

addozhang commented 2 years ago

To cater to the needs of broader developers and/or users community, we propose adding internationalization support for osm documentation. As a pilot and PoC, we (a team of developers from China) have finished the translation of existing OSM documentation into Simplified Chinese (issue #384). And to make it easier for an extension to other locales, we are proposing the changes as below:


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:

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.

zr-msft commented 2 years ago

@addozhang This issue has been addressed and the localization process is documented on the README page. Please reopen with comments if I missed something