aboutsummaryrefslogtreecommitdiff
path: root/core/ustring.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2016-05-03 22:25:37 -0300
committerJuan Linietsky2016-05-03 22:25:37 -0300
commit567cb691ec49844101247bb9dc34bc2722f6af4f (patch)
treecaa577fdc22feec8869e66b32be34db0c90f8aa8 /core/ustring.cpp
parentc7e8def44696da9ddf0b459e166280668c84c4cb (diff)
downloadgodot-567cb691ec49844101247bb9dc34bc2722f6af4f.tar.gz
godot-567cb691ec49844101247bb9dc34bc2722f6af4f.tar.zst
godot-567cb691ec49844101247bb9dc34bc2722f6af4f.zip
Diffstat (limited to 'core/ustring.cpp')
-rw-r--r--core/ustring.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/ustring.cpp b/core/ustring.cpp
index a9d0012eb..573c36238 100644
--- a/core/ustring.cpp
+++ b/core/ustring.cpp
@@ -3955,3 +3955,14 @@ String String::sprintf(const Array& values, bool* error) const {
*error = false;
return formatted;
}
+
+#include "translation.h"
+
+String TTR(const String& p_text) {
+
+ if (TranslationServer::get_singleton()) {
+ return TranslationServer::get_singleton()->translate(p_text);
+ }
+
+ return p_text;
+}