diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2017-10-29 22:26:09 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2017-10-30 00:02:55 +0100 |
commit | 981ef0be59a0702b3d7f59d33084293f282ced71 (patch) | |
tree | 7c132f38682b71ed332f9f9614dda9d4f91bb43d /core/translation.h | |
parent | 619e4eb23df037d152bf7776c5447d46293aadff (diff) | |
download | redot-engine-981ef0be59a0702b3d7f59d33084293f282ced71.tar.gz |
Add support for non-ISO locale identifiers via renames map
Windows apparently uses "no" for Norwegian Bokmål, even though its
ISO 639-1 language code is "nb"... Closes #12479.
Also did some non-intrusive cleanup while at it.
Diffstat (limited to 'core/translation.h')
-rw-r--r-- | core/translation.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/core/translation.h b/core/translation.h index 5fec1d9f45..0cdab3b0bc 100644 --- a/core/translation.h +++ b/core/translation.h @@ -85,8 +85,6 @@ class TranslationServer : public Object { public: _FORCE_INLINE_ static TranslationServer *get_singleton() { return singleton; } - //yes, portuguese is supported! - void set_enabled(bool p_enabled) { enabled = p_enabled; } _FORCE_INLINE_ bool is_enabled() const { return enabled; } @@ -103,6 +101,7 @@ public: static Vector<String> get_all_locales(); static Vector<String> get_all_locale_names(); static bool is_locale_valid(const String &p_locale); + static String standardize_locale(const String &p_locale); void set_tool_translation(const Ref<Translation> &p_translation); StringName tool_translate(const StringName &p_message) const; |