aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/translation.cpp10
-rw-r--r--common/translation.h5
2 files changed, 15 insertions, 0 deletions
diff --git a/common/translation.cpp b/common/translation.cpp
index 1328ed62d2..b81deb6058 100644
--- a/common/translation.cpp
+++ b/common/translation.cpp
@@ -213,6 +213,12 @@ const char *TranslationManager::getCurrentCharset() {
return _currentCharset.c_str();
}
+const char *TranslationManager::getCurrentLanguage() {
+ if (_currentLang == -1)
+ return "C";
+ return _langs[_currentLang].c_str();
+}
+
String TranslationManager::getTranslation(const String &message) {
return getTranslation(message.c_str());
}
@@ -471,6 +477,10 @@ const TLangArray TranslationManager::getSupportedLanguageNames() const {
const char *TranslationManager::getCurrentCharset() {
return "ASCII";
}
+
+const char *TranslationManager::getCurrentLanguage() {
+ return "C";
+}
#endif // USE_TRANSLATION
diff --git a/common/translation.h b/common/translation.h
index 57c4cc2ac8..d6db5d5077 100644
--- a/common/translation.h
+++ b/common/translation.h
@@ -151,6 +151,11 @@ public:
*/
const char *getCurrentCharset();
+ /**
+ * Returns currently selected translation language
+ */
+ const char *getCurrentLanguage();
+
private:
#ifdef USE_TRANSLATION
/**