Skip to content

Commit

Permalink
fix gettext_boost.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
gfgtdf committed Oct 25, 2014
1 parent 588c008 commit 4fc2368
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/gettext_boost.cpp
Expand Up @@ -108,8 +108,15 @@ void set_language(const std::string& language, const std::vector<std::string>* /
// why shoudl we need alternates? which languages we support shoudl only be related
// to which languages we ship with and not which the os supports
std::cerr << "setting language to '" << language << "' \n";
get_manager().current_language_ = language;
get_manager().current_language_ += ".UTF-8";
std::string::size_type at_pos = language.rfind('@');
if(at_pos != std::string::npos)
{
get_manager().current_language_ = language.substr(0, at_pos) + ".UTF-8" + language.substr(at_pos);
}
else
{
get_manager().current_language_ = language + ".UTF-8";
}
get_manager().update_locale();
}

Expand Down

0 comments on commit 4fc2368

Please sign in to comment.