Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localization and enum support #22

Open
PureDark opened this issue Apr 19, 2020 · 1 comment
Open

Localization and enum support #22

PureDark opened this issue Apr 19, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@PureDark
Copy link

PureDark commented Apr 19, 2020

There's already a localization system bannerlord is using, which is the GameTextManager.

GameTextManager.LoadGameTexts(..."module_string.xml");

Then with
GameTexts.FindText(id, variation);

You can get the string of corresponding language.

Maybe you can do this in the next version?

And the other thing is enum support.
Enum is just like int, but where you show the numbers you show enum.ToString() instead.

This could be very useful.

I like this lib, the menu is awesome, but it still lacks some key features.

[SettingPropertyGroup("Group Name")]
[SettingProperty("displayName", "Tooltips")]

Annotations like these make it impossible to make use of the localization method bannerlord provides.
It'll be way better if we can just pass the id

[SettingPropertyGroup("str_mod_menu_group_1")]
[SettingProperty("str_mod_menu_name_1", "str_mod_menu_tips_1")]

Then you can get the text using
GameTexts.FindText("str_mod_menu_group_1").ToString();

@SaulHE
Copy link

SaulHE commented Apr 19, 2020

Yes, I found this issue too.

Now I am using conditional compilation("#if" "#endif" sort of things) for the localization as an alternative to compile twice for the two main languages I am supporting right now.

I would like some localization features supported in this lib as well

@mipen mipen added the enhancement New feature or request label May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants