Skip to content

UI Toolkit Tablet Localisation

Overview

The Tablet uses the Unity Localisation Package and a String based table. This can be exported and imported as a CSV for ease of translation and use across the team.

It is split between two systems since there is the localisation binding on UI Toolkit Text strings and binding on the 3D Text Mesh Pro strings.

Official Documentation:


Localisation Table Editing

To open the Localisation Table you go:

Window -> Asset Management -> Localization Tables

They are stuctured like a regular database where you have the key reference then the corresponding string in each loaded language.

Importing and Exporting is done in the top right.


UI Builder Localisation Binding

To bind localised strings to the UI Toolkit Text Elements, you can do so inside of UI Builder.

The steps are:

  1. Select the text element you want to bind in the hierarchy

  2. In the inspector on the right go to Attributes -> Text

  3. Right click on the text box and selected Add Binding

  4. In the pop up select the type drop down and choose UnityEngine.Localization -> Localized String

  5. In Localized String click Select Entry and select the desired key from the table.


UGUI Localisation Binding

To bind localised strings to the 3D Text Elements, you need to add a Localize String Event component. I have added this in the parent of all the prefabs. If the element is just an icon you can disable this component to prevent any errors.

The steps are:

  1. In Update String add a new element

  2. Reference the TMP_Text object in the field

  3. In the dropdown select TextMeshPro.Text

  4. Select the table key in the String Reference drop down above it