Access localized strings from script?

More
6 years 3 months ago #2693 by jdev
Is it possible to access localized strings from a script?

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

More
6 years 3 months ago #2694 by Frank
Do you mean:

- Get the translation of a Term from code?
use: LocalizationManager.GetTranslation( "Term 1" );
as long as Term 1 is in your I2Languages.prefab, this will return the translation to the current language.

- Get the internal translation data to all languages

var termData = LocalizationManager.GetTermData("Term 1");

That contains an array of languages with the translation to each of the languages.

- Use the LocalizedlString class?
Assets\I2\Localization\Examples\Common\Scripts\Example_LocalizedString.cs

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

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

More
6 years 3 months ago #2695 by jdev
Ah, thank you!

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

Time to create page: 0.233 seconds
Template by JoomlaShine