Skip to content

Commit

Permalink
maybe fix default langauge
Browse files Browse the repository at this point in the history
backports b6f916a
  • Loading branch information
gfgtdf committed Nov 9, 2014
1 parent 78d71d4 commit 83caa8d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/gettext_boost.cpp
Expand Up @@ -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);
}
Expand Down

0 comments on commit 83caa8d

Please sign in to comment.