If you want to offer users your solution in multiple languages, you can use localization built into Jigx. Every option that accepts string-based values (e.g. field labels) can be localized. If you see TextLocale popping up in IntelliSense, it can be localized.
In the right screenshot you can see an example of a localized being displayed on a mobile device with German language setting active.
There are two options for localization:
- You can map a string using a unique identifier to a localized string, that is stored in a language file (e.g. translations/de.jigx for german) in your solution directory.
- If there is no translation found for the active device language, it will either fall back to your specified defaultMessage or if that's missing, to English.
- In the right example the second field will display a different text (good morning or good afternoon) based on the time of the day and add another context variable (userName) as well
- This can be achieved with values you add to the TextLocale option and ICU Message definitions in the translations file (translations/de.jigx)
You can find an online playground for ICU messages here