(986a3bf)
#include "utils/gettexthelper.h"
#include "configuration.h"
#include "client.h"
#include "logger.h"
#include "fs/virtfs/fs.h"
#include <libintl.h>
#include <locale.h>
#include "utils/env.h"
#include "debug.h"
Go to the source code of this file.
◆ setLangEnv()
static std::string setLangEnv |
( |
| ) |
|
|
static |
Definition at line 55 of file gettexthelper.cpp.
58 #if defined(ENABLE_NLS) && defined(WIN32)
60 lang = std::string(_nl_locale_name_default());
61 #elif defined(ENABLE_CUSTOMNLS) && defined(__native_client__)
64 NaclMessageHandle *handle = naclRegisterMessageHandler(
66 naclPostMessage(
"get-uilanguage",
"");
67 lang = naclWaitForMessage(handle);
74 putenv(
const_cast<char*
>((
"LANG=" + lang).c_str()));
75 putenv(
const_cast<char*
>((
"LANGUAGE=" + lang).c_str()));
78 setEnv(
"LANG", lang.c_str());
79 setEnv(
"LANGUAGE", lang.c_str());
std::string getStringValue(const std::string &key) const
void setEnv(const char *const name, const char *const value)
References config, Configuration::getStringValue(), and setEnv().
Referenced by GettextHelper::initLang().