Multiple languages at the same time

More
9 years 8 months ago #602 by attilam
Hi,

the use case is a big multi user touchscreen-wall installation where there could be 3-5 people at the same time. Each user should be able to set the active language on their own GUI controls independently of each other.

Is something like this supported by I2L, or easy to implement?

Thanks,
Attila

Please Log in or Create an account to join the conversation.

More
9 years 8 months ago #603 by Frank
Multiple languages at the same time is not supported by default.
However, you can use the Localization callback to have a different language on a section of the interface.

Here is an script that allows you to do that:
inter-illusion.com/forum/i2-localization...age-term-by-term#534

Hope that helps,
Frank

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out
The following user(s) said Thank You: attilam

Please Log in or Create an account to join the conversation.

More
9 years 8 months ago #604 by attilam
Thanks for the quick reply, this seems like something I could start with.

In my use case there is no "master" language for the app, so I guess the way I would solve this is when the user changes language on their screen I would iterate through all localized objects for that screen and override the contents using the set language.

Please Log in or Create an account to join the conversation.

More
9 years 5 months ago #839 by attilam
I have implemented a solution in the mean time so I thought I'd describe it here.

The solution is basically the same as the way ToggleGroups work in Unity UI. There are LocalizeGroups (implemented as a component, just like ToggleGroup) that represent groups of objects that should share the same language setting, and LocalizeItems (also a component, on GameObjects that have Localize on it) that belong to a group.

You can set the group a LocalizeItem belongs to by either dragging in a LocalizeGroup reference in the inspector, or the LocalizeItem itself can GetComponentInParent<LocalizeGroup>() if it's null (usually I have the LocalizeGroup somewhere as a root above the objects to be localized).

When enabled at play time the LocalizeItem registers itself with the specified group, so the group can gain control over it (i.e.: when you change language on the LocalizeGroup all objects that belong to it are updated automatically).

So far this solution works very well.

Please Log in or Create an account to join the conversation.

More
9 years 5 months ago #841 by Frank
Nice solution!!
I will add that approach to the Todo list for the next releases.

Thanks!
Frank

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out

Please Log in or Create an account to join the conversation.

Time to create page: 0.176 seconds
Template by JoomlaShine