Create terms from script
- sewerhrehorowicz
- Topic Author
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
5 years 4 months ago #3908
by sewerhrehorowicz
Create terms from script was created by sewerhrehorowicz
Hello,
How can I create terms from c#?
thanks in advance
How can I create terms from c#?
thanks in advance
Please Log in or Create an account to join the conversation.
5 years 4 months ago #3909
by Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Replied by Frank on topic Create terms from script
Here are a few links that explains in more detail how to add terms:
inter-illusion.com/forum/i2-localization...s-via-a-scripts#2799
inter-illusion.com/forum/i2-localization...m-editor-script#3296
Basically, you just find the LocalizationSource and use the AddTerm(xx). And then call UpdateDictionary to update the cache.
LocalizationManager.Sources[0] its the I2Languages.prefab
Hope that helps,
Frank
inter-illusion.com/forum/i2-localization...s-via-a-scripts#2799
inter-illusion.com/forum/i2-localization...m-editor-script#3296
Basically, you just find the LocalizationSource and use the AddTerm(xx). And then call UpdateDictionary to update the cache.
TermData termData = LocalizationManager.Sources[0].AddTerm("My New Term");
termData.Languages[0] = "This is an Example";
termData.Languages[1] = "Esto es un ejemplo";
// after adding al the terms
LocalizationManager.Sources[0].UpdateDictionary();
LocalizationManager.Sources[0] its the I2Languages.prefab
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.
- sewerhrehorowicz
- Topic Author
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
5 years 4 months ago #3913
by sewerhrehorowicz
Replied by sewerhrehorowicz on topic Create terms from script
In Editor, this will cause out of range exception, and first you need to call this:Then it will work.
Guys please fix website. Submit button is cut off, there is no scrollbar and I have to hack styles in developer console to reply.
LocalizationManager.InitializeIfNeeded();
Guys please fix website. Submit button is cut off, there is no scrollbar and I have to hack styles in developer console to reply.
Please Log in or Create an account to join the conversation.
Time to create page: 0.147 seconds