You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the docs, OS.get_locale() should return a string of the form language_Script_COUNTRY_VARIANT@extra (notice the underscores). This isn't the case in HTML5 exports, where it returns a string that uses hyphens.
This also breaks OS.get_locale_language() because it expects underscores.
Windows:
print(OS.get_locale()) # en_USprint(OS.get_locale_language()) # en
Godot version
v3.5.beta.custom_build [6d9cbcb]
System information
Windows 10, Chrome 103
Issue description
According to the docs,
OS.get_locale()
should return a string of the formlanguage_Script_COUNTRY_VARIANT@extra
(notice the underscores). This isn't the case in HTML5 exports, where it returns a string that uses hyphens.This also breaks
OS.get_locale_language()
because it expects underscores.Windows:
HTML5:
It seems that adding
locale = locale.replace("-", "_")
here solves the issue.If this fix is good I can open a PR.
Steps to reproduce
See above.
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: