maybe fix default langauge

backports b6f916adf1
This commit is contained in:
gfgtdf 2014-11-10 00:19:30 +01:00
parent 78d71d4119
commit 83caa8d48b

View file

@ -117,7 +117,12 @@ void set_language(const std::string& language, const std::vector<std::string>* /
// to which languages we ship with and not which the os supports
LOG_G << "setting language to '" << language << "' \n";
std::string::size_type at_pos = language.rfind('@');
if(at_pos != std::string::npos)
if(language.empty())
{
//Don't add "UTF-8" to default language.
get_manager().current_language_ = "";
}
else if(at_pos != std::string::npos)
{
get_manager().current_language_ = language.substr(0, at_pos) + ".UTF-8" + language.substr(at_pos);
}