Changing the game Language


Now that the source, the languages, the terms and the localize components are setup, its time to run the game and see how the label it’s localized.


By default, when running the game for the first time, the I2 Localization plugin will try enabling the device language as reported by the unity (Application.systemLanguage). If that language is not included in the Language Source then the first language in the source is used instead.


While playing, a different language can be selected by running the following script. As soon a new language is set ad Current, all objects in the scene containing a Localize component will be updated automatically.


if (LocalizationManager.HasLanguage(LanguageName))

{

LocalizationManager.CurrentLanguage = LanguageName;

}



The plugin contains several example scenes showing how to change the language by clicking on buttons or selecting them from a dropdown list.


Created with the Personal Edition of HelpNDoc: Easily create iPhone documentation