-
Notifications
You must be signed in to change notification settings - Fork 0
Localization
TomAuger edited this page Aug 31, 2015
·
4 revisions
Localization (l10n) is the process of making multiple versions of the app available in different languages. How the app decides which language to select is up to you - but generally you want to query the device's language and use that as a starting point.
- Any text that appears in you app (content, headings, menus, buttons, alerts, labels, UI elements) should be localizable (ie: NOT hard-coded in Flash)
- Any TextField or TextArea can be localized using Kestrel
- Localization can happen any time, but Kestrel has a localization phase that is the best time to populate your strings with content in the right language
- Localization is handled through the
Localizer
class. The Localizer is a proxy between the App and your localized content data (the "strings"). The easiest way to implement this is through XML, but other strategies are possible, by subclassingLocalizer
There are many Phases that a Screen goes through (see "Screen Phases" elsewhere in this documentation). The Localization Phase is a phase that is performed once, every time a Screen is switched to. This is the only time that the App hands the Screen a reference to the Localizer, which is needed to translate the strings that appear on the Screen.