ShowTable of Contents
Get current langauge
To get the current language of the device, use
a two letter language code in lower case like "en" or "de".
Storing language data
Strings for the YouAtNotes Framework are stored in yn/i18n/yn_i18n_<langkey>.js files as a dictionary.
Get a localized string
Add your own language strings
You can add your own, application specific strings with:
ynI18N.addString(key, language, s);
key: a new key for your string, for example "formLabel1".
language: a language identifier like "en" or "de" (two chars).
s: the actual string
After adding a string, you can get the string back depending on the actual language of the device with ynL(key).
Default strings' keys of the YouAtNotes Framework are prefixed with "yn", so when adding your own strings, you should avoid keys starting with "yn".
Print out a string of the YouAtNotes Framework depending on the device language:
Add custom strings for language de and en:
ynI18N.addString("label1", "en", "This is my label.");
ynI18N.addString("label1", "de", "Das ist mein Label.");
Titanium has it's own, different approach for application internationalization. It's up to you which technique you want to use.