aboutsummaryrefslogtreecommitdiff
path: root/src/common/i18n.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-11-21 10:11:50 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-11-21 10:11:50 +0000
commit0c1dae32b4e47417ec46f261014a888d4ca33348 (patch)
tree9d960f0e5edaddc4da5237ea7665c5a282501205 /src/common/i18n.h
parentMerge pull request #490 (diff)
downloadmonero-0c1dae32b4e47417ec46f261014a888d4ca33348.tar.xz
i18n: allow language to be passed as a parameter
If empty, it will still be fetched from the environment
Diffstat (limited to '')
-rw-r--r--src/common/i18n.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/i18n.h b/src/common/i18n.h
index 2aeac2287..8a1f3cf3d 100644
--- a/src/common/i18n.h
+++ b/src/common/i18n.h
@@ -30,7 +30,8 @@
#define QT_TRANSLATE_NOOP(context,str) i18n_translate(str,context)
-int i18n_set_language(const char *directory, const char *base);
+std::string i18n_get_language();
+int i18n_set_language(const char *directory, const char *base, std::string language = std::string());
const char *i18n_translate(const char *str, const std::string &context);
static inline std::string get_default_i18n_context() { return std::string(); }
static inline const char *tr(const char *str) { return i18n_translate(str,get_default_i18n_context()); }