-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Add a method to output the name of a locale in its language (instead of English) #2378
Comments
I thought we were already using translated locale names, but I just checked the Godot editor and they're all in English… We need to replace all the English locale names with their translated variants, but this may be considered a breaking change. This means it'll likely have to wait for 4.0. There are very few reasons for displaying all language names in the user's current language (on top of the burden it imposes on translators), so we might as well replace the original strings directly in the source code. |
Bump on this, was there any resolution for 4.0? |
As far as I know, no contributor is currently working on this. Also, since 4.0 is in feature freeze, this will have to wait for a future 4.x release to be implemented. For compatibility reasons, this will require adding a new method such as I'm not currently working on this, so feel free to open a pull request for this if you wish 🙂 |
Describe the project you are working on
Single and multiplayer quiz game.
Describe the problem or limitation you are having in your project
I have a menu screen with settings for the language of the game, including options to show subtitles, to switch the voiceover language and the text language separately. The problem is that
TranslationServer.get_locale_name(locale)
always returns the name of the imported locale in English. To get around this, I have to separately create a map of relationships between the code and its name in the language of that locale.Describe the feature / enhancement and how it helps to overcome the problem or limitation
To improve accessibility, instead of displaying any name in English, you should display the name of the locale in its language. Not all users know English and not all of them can recognize the name of their language in English.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Instead of bringing the names of languages to English:
It should be returned:
If this enhancement will not be used often, can it be worked around with a few lines of script?
Yes. Either on the part of the project developer via code map with the name bypassing
get_locale_name
method, or on the part of the engine developers by simply fixing the already implemented name strings, or by creating a separate method to get language name in locale language, so as not to break backward compatibility.Is there a reason why this should be core and not an add-on in the asset library?
This is a small enough fix that does not break the existing engine logic and its results are quite common in games with support for additional localizations.
The text was updated successfully, but these errors were encountered: