Clone wiki

kojo / Kojo Localization

There are three levels of localization. Level 1 means translation of user interface text. Level 2 means translation of the most important turtle commands. Level 3 means localization of samples.

  1. UI localization:

    • Translate to your local language, giving it the name, where xx is your language code.
    • In LangMenuFactory.scala, add your language code to val supportedLanguages in line 31 and your language name to private val langNames in line 75.

    If you want to know the key of a UI text item, create (in your home directory) a file called .kojo/lite/ and put the following entry in there:


    Then (re)start Kojo. You will now see all localized UI text in the format localText[key].

  2. Turtle command localization: You have a couple of options:

    1. Easy Option: Translate and send it to the kojo-dev mailing list for further processing.
    2. Option with more control: Create translations of the swedish files svInit.scala as well as using your language code instead of "sv". Add a call to your xxInit.init in LangInit.scala.

    You need to use only one of the options above. If you go with option (2), you can also use option (1) to auto-generate xxInit.scala, which you can then refine as needed.

  3. Sample Localization
    If you want to, for example, localize the following sample for Swedish:

    Then you just need to create the following localized version of the sample:

    The version of spiral.kojo under the sv directory will get picked up when Kojo is running in Swedish mode.

If any of this is confusing, feel free to ask questions on the kojo-dev mailing list.