Access localized strings from script?
6 years 11 months ago #2693
by jdev
Access localized strings from script? was created by jdev
Is it possible to access localized strings from a script?
Please Log in or Create an account to join the conversation.
6 years 11 months ago #2694
by Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Replied by Frank on topic Access localized strings from script?
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
- 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.
6 years 11 months ago #2695
by jdev
Replied by jdev on topic Access localized strings from script?
Ah, thank you!
Please Log in or Create an account to join the conversation.
Time to create page: 0.136 seconds