add/remove terms through code

More
3 years 10 months ago #843 by Deadcow
Is there a way to add/remove terms through code? I've got my own dialogue system, it allows to add/remove dialogs and add/remove messages in this dialogs through inspector of object, which will cause dialog to open on interaction, and each message is currently refers to string. I want to modify this system and refer to localization terms instead of strings, but keep this dynamic of creation. Is this possible? (I dont fount api documentation)

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

More
3 years 10 months ago #844 by Frank
Replied by Frank on topic add/remove terms through code
In your editor code you can use:
LocalizationManager.UpdateSources();
var languageSource = LocalizationManager.Sources[0];

TermData data = languageSource.AddTerm("My Term", eTermType.Text);

Then fill the content of data with the new term translations.

You can also use
languageSource.RemoveTerm( term )

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 10 months ago #847 by Deadcow
This is exactly what I wanted, thanks

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

Time to create page: 0.107 seconds
Template by JoomlaShine