Dynamically assign translation?

More
9 years 9 months ago #158 by aholla
Hi I was wondering how I would access the Translation in code? I have a list of fields and wan to to be able to look up the terms based upon an id or a string or something.

Thanks,

Adam

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

More
9 years 9 months ago #159 by Frank
Hi,

You can translate any term (ID) by using
string Translation = ScriptLocalization.Get( Term )

If what you want its changing the localization to attach numbers or other things, Like transforming
"THE SCORE IS {SCORE}" into "THE SCORE IS 320"

Then you can use the localization callbacks. There is an example on the "UnityStandards Localization" scene


More details at: www.inter-illusion.com/forum/i2-localiza...irectly-from-scripts


If you want to execute your scripts everytime the language is changed, use the LocalizationManager.OnLocalizeEvent
www.inter-illusion.com/forum/i2-localiza...-call-without-target

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
The following user(s) said Thank You: aholla

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

Time to create page: 0.145 seconds
Template by JoomlaShine