# Localizing Components

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 system offers various ready-to-use components.

### Localizing a Text Component

* While the Text game object selected, click **Add Component** button in the inspector.
* Search for **Localized Text** and add it.
* **LocalizedTextBehaviour** needs a component and it's property to set localized value to the property.
* Drag the `Text` component from the game object to the **LocalizedTextBehaviour**'s **Component** field.
* The localization system searches for the text (`string`) based properties. **Property** drop-down lists available properties. Simply select **text** property.
* Finally, select localized text asset from the **Localized Asset** field.

{% embed url="<https://gfycat.com/LeanFreshBangeltiger>" %}
Localizing Text Component
{% endembed %}

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 behavior with same steps for the [Text Mesh Pro](https://assetstore.unity.com/packages/essentials/beta-projects/textmesh-pro-84126) component. You should follow the similar steps for all localized asset types. For instance; attach **LocalizedSpriteBehaviour** for the [Image](https://docs.unity3d.com/Manual/script-Image.html) component and select [sprite](https://docs.unity3d.com/ScriptReference/UI.Image-sprite.html) property and done!

{% embed url="<https://gfycat.com/WelcomeTastyArchaeocete>" %}
Localizing Custom Component & Property
{% endembed %}

If you want to go further and create your custom localization behavior, see [here](https://hibrahimpenekli.gitbook.io/gametoolkit-localization/scripting-reference#extending-custom-localized-asset).
