Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

New Language support

Clam- edited this page Aug 5, 2018 · 5 revisions

Note to self (and anyone else)

To support a new language one needs to:

  • Modify CharMap.java
  • New Map needs to be created with the characters to be encountered in addWord or in the user dictionary when loaded.
  • New character array needs to be added for characters that are to cycle on each number press.
  • New array needs to be made to tell where the capital letters start in that array.
  • modify LangHelper.java
  • Add new entry in ICONMAP
  • Get Icon descriptions so can get new mode icons made (e.g. "Ab", "En", "12" for English modes)
  • Add new LANGUAGE enum entry e.g. FR(3,5) (index, id) Where index is index in arrays like LOCALES, and id is the identifier used in the database and such. The latter should never change unless database update is done.
  • Make sure new id matches const.xml
  • Add the LOCALE of the language in the LOCALES Locale array
  • Add translations for arrays.xml and strings.xml in to new files in the appropriate locale folder (e.g. res/values-de/arrays.xml.) AndroidStudio has a cute/nice Translation Editor which might be handy.
    • Edit the base arrays.xml file to add the new language. (pref_lang_titles, pref_lang_values)
    • Exclude translatable="false" items from the new locale arrays.xml file.
    • Also make sure the new language is added to pref_loaduserdictdesc (base non-locale strings.xml)
  • Find a suitable dictionary and add it to assets
  • Finally get translation for playstore.txt

That should be it? I hope.