How it works
To localize a project, I2 Localization provides a set of classes that allow storing, managing and editing the translations. Also it provides a component that can be used to modify the localizable objects to show the correct translation based on the device language and also an API to allow dynamic translations, import/export, callbacks and lot of other useful features.
Next its a brief description of the components and objects used to localize a project.
I2 Localization stores all localizations in LanguageSources. They define all languages that the project supports and a list of everything that can be localized. Also, they provide tools to manage the localization, detect errors and synchronize the localization with external spreadsheets.
Normally all localizations are stored in a Language Source named I2Languages.asset which its located in the Resources folder. This scriptableObject its created automatically and any localization defined there, its global to the entire project. All labels, sprites and other localizable objects will try by default to find their translation in that asset without needing to instantiate it any scene.
(Depending on the version of I2 Localization used, the I2Languages will be located at Assets/Resources/I2Languages.asset or Assets/I2/Localization/Resources/I2Languages.prefab)
Language Sources can also be created local to an scene so its content its only loaded and accessible when that scene is loaded. This can also be used to work with Asset Bundles. All the provided example scenes use this approach so that the example translations don't affect the project localization. To use this approach, just create an object inside the scene and add the LanguageSource component. Nonetheless, normally its advised to use I2Languages.asset instead.
With all the translations stored in the Language Source, the Localize component can be applied to any localizable object (Label, Sprite, SoundSource, etc) so that its value gets modified based on the current language.
After adding the Localize component, just select the correct translation ID or create a new one. The component will look that ID (aka: Term) in the Language Source and will show its translation for each language. Also when playing, if the language its changed, it will modify the target value (label's text, font, etc) with the translation for the device language)
The Localize component also has options to automatically apply correct the rendering of Arabic and other Right-To-Left languages, change text's case, execute callbacks, specialize the translation based on whether the game its running on a Touch device or a PC, etc.
Created with the Personal Edition of HelpNDoc: Free Kindle producer