-
Couldn't load subscription status.
- Fork 20
Localizing Components
[DEPRECATED] Please refer to new documentation
Localized assets must be attached to the actual game objects in the scene in order to set localized value to the appropriate component's attribute. The package offers various ready-to-use components.
Localizing a Text
-
When the Text game object selected, click
Add Componentbutton in the inspector. -
Search for
LocalizedTextBehaviourand add it.
-
LocalizedTextBehaviourneeds a component and it's property to set localized value to the property. -
Drag the
Textcomponent from the game object to theLocalizedTextBehaviour'sComponentfield.
-
The localization system search for the text (
string) based properties.Propertydropdown lists available properties. Simply selecttextproperty.
-
Finally, select localized asset from the
Localized Assetfield.
When the game starts, the localization sets the text property of the selected component with selected localized asset's value. Updates the value whenever game language has changed.
This generic component & property selection provides us to use at any component that has text based property. For example; we can use same behaviour with same steps for the Text Mesh Pro component. You should follow the similar steps for all localized asset types. For instance; attach LocalizedSpriteBehaviour for the Image component and select sprite property and done!
If you want to go further and create your custom localization behaviour, see here.