diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2015-11-21 10:11:50 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2015-11-21 10:11:50 +0000 |
commit | 0c1dae32b4e47417ec46f261014a888d4ca33348 (patch) | |
tree | 9d960f0e5edaddc4da5237ea7665c5a282501205 /src/common/i18n.h | |
parent | Merge pull request #490 (diff) | |
download | monero-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.h | 3 |
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()); } |