Reverse lookup the Term using the translated string as the key ?

More
3 years 11 months ago #4206 by jonnyhilly
is there a way via script, to do a reverse lookup please?
there is the normal way, passing in the term to GetTranslation() that returns the translated string...

but can I do the opposite? what if I have the translated string, in a known language... say English, and I want I2 to tell me what the term is ? is there such a function please?
How do I do this via script ?

failing that, can I get access to the whole term, string dictionary for a language, so I can search it myself ?
thanks in advance for any help.

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

More
3 years 11 months ago #4207 by Frank
Hi,
There is no function to return a Term name based on the localized text.
But it should be easy to get it from the Localization data.

You can access the term's list and dictionary using:

LocalizationManager.Sources[0].SourceData.mDictionary

that will map the term name to a TermData, which in turn has a array with the localized string for each language.

Be aware that if you selected Unload Unused Languages in the LanguageSource inspector, then at runtime, only the current language will have values. In the editor, the array always has the full values.

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
3 years 11 months ago #4209 by jonnyhilly
Thanks very much Frank, much appreciated :)

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

Time to create page: 0.181 seconds
Template by JoomlaShine