diff options
Diffstat (limited to 'core/translation.h')
-rw-r--r-- | core/translation.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/translation.h b/core/translation.h index cf59583ad6..0cdab3b0bc 100644 --- a/core/translation.h +++ b/core/translation.h @@ -73,6 +73,8 @@ class TranslationServer : public Object { Set<Ref<Translation> > translations; Ref<Translation> tool_translation; + Map<String, String> locale_name_map; + bool enabled; static TranslationServer *singleton; @@ -83,14 +85,14 @@ 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; } void set_locale(const String &p_locale); String get_locale() const; + String get_locale_name(const String &p_locale) const; + void add_translation(const Ref<Translation> &p_translation); void remove_translation(const Ref<Translation> &p_translation); @@ -99,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; |