How to check what language is disabled?
7 years 10 months ago - 7 years 10 months ago #2007
by mcmorry
How to check what language is disabled? was created by mcmorry
I'd like to dynamically hide the language selection buttons of disabled languages.
I can't easily find the API method. The "LocalizationManager.HasLanguage()" still returns true also for disabled ones.
Also a couple of related issues:
1. If a language is disabled, in the editor, while not in play mode, I can't preview it while inserting some text, or clicking on the language name.
2. If I install the game on a device (with auto selecting language) with, for example, Italian language, and then later I disable that language, the game doesn't roll back to the default language, and all the texts are empty.
I can't easily find the API method. The "LocalizationManager.HasLanguage()" still returns true also for disabled ones.
Also a couple of related issues:
1. If a language is disabled, in the editor, while not in play mode, I can't preview it while inserting some text, or clicking on the language name.
2. If I install the game on a device (with auto selecting language) with, for example, Italian language, and then later I disable that language, the game doesn't roll back to the default language, and all the texts are empty.
Last edit: 7 years 10 months ago by mcmorry.
Please Log in or Create an account to join the conversation.
7 years 10 months ago #2011
by Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Replied by Frank on topic How to check what language is disabled?
Hi,
I'm really sorry for the delay in replying. I saw this a couple days ago and I thought I answered already! I'm really sorry! These last days I have been overwhelmed with the release of I2 SmartEdge and I'm catching up now to continue implementing the new I2 Localization features.
Thanks for reporting this issue. I went and fix them in the latest I2L (v2.6.10a3) which is now in the beta folder.
I added a new parameter to the HasLanguage() and GetAllLanguages() to decide if skipping disabled languages or not. By default this two functions will now skip those disabled languages.
Also, if you disable the language, the plugin will no longer select it on Startup, and instead will fallback to the first enabled one.
You can get all this changes right now by downloading the latest version from the beta folder!
Said that, if you decide to wait for an official release in the Assetstore, you could modify you code for checking if the language is enabled:
Hope that helps, and again, sorry for the delay!
Frank
I'm really sorry for the delay in replying. I saw this a couple days ago and I thought I answered already! I'm really sorry! These last days I have been overwhelmed with the release of I2 SmartEdge and I'm catching up now to continue implementing the new I2 Localization features.
Thanks for reporting this issue. I went and fix them in the latest I2L (v2.6.10a3) which is now in the beta folder.
I added a new parameter to the HasLanguage() and GetAllLanguages() to decide if skipping disabled languages or not. By default this two functions will now skip those disabled languages.
Also, if you disable the language, the plugin will no longer select it on Startup, and instead will fallback to the first enabled one.
You can get all this changes right now by downloading the latest version from the beta folder!
Said that, if you decide to wait for an official release in the Assetstore, you could modify you code for checking if the language is enabled:
var Lang = "English";
var index = LocalizationManager.Sources[0].GetLanguageIndex(Lang);
var isEnabled = LocalizationManager.Sources[0].mLanguages[index].IsEnabled();
Hope that helps, and again, sorry for the delay!
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
The following user(s) said Thank You: mcmorry
Please Log in or Create an account to join the conversation.
7 years 10 months ago #2013
by mcmorry
Replied by mcmorry on topic How to check what language is disabled?
Thank you! I'll download it from the beta folder.
And there is no reason to ask sorry.
You support is one of the best in the assets store, and for sure 3 days (including a weekend) are not a problem. Especially if the answer is so satisfying!
Thank you,
Maurizio
And there is no reason to ask sorry.
You support is one of the best in the assets store, and for sure 3 days (including a weekend) are not a problem. Especially if the answer is so satisfying!
Thank you,
Maurizio
Please Log in or Create an account to join the conversation.
7 years 10 months ago #2020
by mcmorry
Replied by mcmorry on topic How to check what language is disabled?
Hi Frank,
I still have this issue: If a language is disabled, in the editor, while not in play mode, I can't preview it while inserting some text, or clicking on the language name.
The thing is that if I'd like to see a localized text at design time before to activate its related language.
I still have this issue: If a language is disabled, in the editor, while not in play mode, I can't preview it while inserting some text, or clicking on the language name.
The thing is that if I'd like to see a localized text at design time before to activate its related language.
Please Log in or Create an account to join the conversation.
7 years 10 months ago #2024
by Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Replied by Frank on topic How to check what language is disabled?
Hi,
That was the initial design. Disabled languages were meant to store data for the developers doing translators (will show as extra columns in the Spreadsheet).
That's why everything was disabled for them in the editor, even previewing it.
But I do understand your usecase. So, I changed the code to allow previewing disabled languages and even returning the translation if you call ScriptLocalization.Get().
But they will not show when requesting all the languages (LocalizationManager.GetAllLanguages or GetLanguageIndex), unless the skipDisabled parameter is set to false.
Hope that helps. The new changes are in version 2.6.10a5 (in beta folder)
Frank
If a language is disabled, in the editor, while not in play mode, I can't preview it while inserting some text, or clicking on the language name.
That was the initial design. Disabled languages were meant to store data for the developers doing translators (will show as extra columns in the Spreadsheet).
That's why everything was disabled for them in the editor, even previewing it.
But I do understand your usecase. So, I changed the code to allow previewing disabled languages and even returning the translation if you call ScriptLocalization.Get().
But they will not show when requesting all the languages (LocalizationManager.GetAllLanguages or GetLanguageIndex), unless the skipDisabled parameter is set to false.
Hope that helps. The new changes are in version 2.6.10a5 (in beta folder)
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
The following user(s) said Thank You: mcmorry
Please Log in or Create an account to join the conversation.
Time to create page: 0.199 seconds