Skip to content

15. Support for multiple languages

Ilkka Seppälä edited this page Mar 24, 2024 · 7 revisions

Overview

We have multiple ways of how the user can approach the repository:

  1. Browse the Github repository directly https://github.com/iluwatar/java-design-patterns
  2. Use the website https://java-design-patterns.com

The main language is English, but we need to add translations for several other languages. For scenario 1) the user can browse to the correct language file and for scenario 2) we provide a language selector component in the top navigation (see the website).

Organization rules of translated files

The method for organizing the translations is to put them into directories named after the language code. The translated file still uses the original name (e.g. README.md),just place it in the directory named after the language code.

  • localization
    • fr
      • README.md
    • zh
      • README.md
      • abstract-document
        • README.md
      • abstract-factory
        • README.md
      • active-object
        • README.md

Language code

The language codes are listed on this page: http://www.loc.gov/standards/iso639-2/php/code_list.php. See the column "ISO 639-1 Code".