AliciaCastillo
Topic Author
Posts: 16
Joined: 16 Apr 2024, 10:17

Working with Unity Localization approach

18 Jul 2024, 13:05

Hi,
We are working on the localization system for our project and we are using Unity Localization since we want to use the smart translations that it provides.

We've been able to bind the views and refresh texts when the language changes by creating a Dictionary<string,localizedString> that implements the propertyChanged and subscribes to the localizedString .StringChanged event and returns the value of the localizedString with GetLocalizedString().

We bind the text in the views to the dictionary using the keys in the dictionary like this:
<Button Content="{Binding myDictionary[MyCustomStringKey]}"/>
My questions are:

Do you advise a different aproach when working with Unity Localization? Can you give some examples?

Do you know if is it possible to bind directly to the keys that exists in the Localization tables?
For example, if i've got the LOGIN_BUTON_TEXT key in unity localization table which I suppose it's linked somehow to its LocalizedString, can we access that key to save it in our dictionary? the keys we are using are created by us and that means that we need to add an extra layer for binding our keys to the LocalizedString.

Thanks for your help!
 
User avatar
jsantos
Site Admin
Posts: 4124
Joined: 20 Jan 2012, 17:18
Contact:

Re: Working with Unity Localization approach

20 Jul 2024, 18:08

First at all I recommend having a look at our Localization Tutorial and corresponding sample included in the Unity package. This is using LocExtension and RichText extensions.

Unlike Unreal, we do not use Unity Localization, but we can consider this if it is critical for you.

Who is online

Users browsing this forum: No registered users and 1 guest