summaryrefslogtreecommitdiffstats
path: root/core/string/translation_server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/string/translation_server.cpp')
-rw-r--r--core/string/translation_server.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/string/translation_server.cpp b/core/string/translation_server.cpp
index 31c221dad7..3d49d482dd 100644
--- a/core/string/translation_server.cpp
+++ b/core/string/translation_server.cpp
@@ -29,6 +29,7 @@
/**************************************************************************/
#include "translation_server.h"
+#include "translation_server.compat.inc"
#include "core/config/project_settings.h"
#include "core/io/resource_loader.h"
@@ -218,8 +219,8 @@ TranslationServer::Locale::Locale(const TranslationServer &p_server, const Strin
}
}
-String TranslationServer::standardize_locale(const String &p_locale) const {
- return Locale(*this, p_locale, false).operator String();
+String TranslationServer::standardize_locale(const String &p_locale, bool p_add_defaults) const {
+ return Locale(*this, p_locale, p_add_defaults).operator String();
}
int TranslationServer::compare_locales(const String &p_locale_a, const String &p_locale_b) const {
@@ -591,7 +592,7 @@ void TranslationServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_tool_locale"), &TranslationServer::get_tool_locale);
ClassDB::bind_method(D_METHOD("compare_locales", "locale_a", "locale_b"), &TranslationServer::compare_locales);
- ClassDB::bind_method(D_METHOD("standardize_locale", "locale"), &TranslationServer::standardize_locale);
+ ClassDB::bind_method(D_METHOD("standardize_locale", "locale", "add_defaults"), &TranslationServer::standardize_locale, DEFVAL(false));
ClassDB::bind_method(D_METHOD("get_all_languages"), &TranslationServer::get_all_languages);
ClassDB::bind_method(D_METHOD("get_language_name", "language"), &TranslationServer::get_language_name);