summaryrefslogtreecommitdiff
path: root/core/ustring.cpp
diff options
context:
space:
mode:
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 a9d0012ebe..573c362389 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;
+}