The Immerse SDK supports localisation to any language - many UI elements displayed to the user can be localised, including system dialogs, tooltips, etc.
Ensure that the fonts used support all languages required, otherwise some characters might not be rendered correctly.
The SDK provides the LocalisationService singleton which implements runtime code support for managing the current language, loading the localised text database and looking up localised text from text keys.
The localised text database is a simple, tab-delimited, key-value text file. It maps named text keys to localised text. The SDK ships with a few examples in Assets\Resources\ImmerseSDK\Localisation.
Each language has its own file; a naming convention is used to discover the files at runtime (ensure they are in a Resource folder).
Use the ISO-369-1 codes to reference a language.
There are 3 different ways that localisation can be used in the Immerse SDK:
LocaliseTextcomponent can be used on the same GameObject as Unity's UGUI Text component.
- A named text key can be specified, instead of freeform text, in supported components (such as Dialogs).
LocalisationServicecan be used to look up a named text key.
|The named text key to be used|
|Prints an error to the console if the text name property is invalid|
|Forces all the localised text into upper case|
Updated 5 months ago