Using I2 Localization as a database.
7 years 11 months ago - 7 years 11 months ago #1982
by robo99
Using I2 Localization as a database. was created by robo99
Is it possible to get the amount of TERMS for a given category?
I'm make a name generator where I want the names to be localized.
I'm make a name generator where I want the names to be localized.
Last edit: 7 years 11 months ago by robo99.
Please Log in or Create an account to join the conversation.
7 years 11 months ago - 7 years 11 months ago #1985
by Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Replied by Frank on topic Using I2 Localization as a database.
Hi,
You can get the list of ALL terms using
Also, you can find what category a term has by using
And to get a list of all terms in a category, you can either iterate and add to a list, or for short using Linq:
Hope that helps,
Frank
You can get the list of ALL terms using
string[] terms = LocalizationManager.GetTermsList();
Also, you can find what category a term has by using
string category = LanguageSource.GetCategoryFromFullTerm( Term );
And to get a list of all terms in a category, you can either iterate and add to a list, or for short using Linq:
using System.Linq;
string Category = "example";
string[] terms = LocalizationManager.GetTermsList().Where(x => (LanguageSource.GetCategoryFromFullTerm(x) == Category)).ToArray();
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
Last edit: 7 years 11 months ago by Frank.
The following user(s) said Thank You: robo99
Please Log in or Create an account to join the conversation.
7 years 10 months ago #1997
by robo99
Replied by robo99 on topic Using I2 Localization as a database.
Thanks, Frank!
Please Log in or Create an account to join the conversation.
5 years 11 months ago #3394
by robo99
Replied by robo99 on topic Using I2 Localization as a database.
I just updated and "LanguageSource.GetCategoryFromFullTerm()" is now gone... What to do?
Please Log in or Create an account to join the conversation.
5 years 11 months ago #3395
by Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Replied by Frank on topic Using I2 Localization as a database.
Because of the recent changes to the Unity Prefabs, all the functionality of the LanguageSource moved into LanguageSourceData
So, you should use:
Hope that helps,
Frank
So, you should use:
LanguageSourceData.GetCategoryFromFullTerm(...)
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.
Time to create page: 0.146 seconds