1
0
mirror of https://github.com/anope/anope.git synced 2026-06-25 12:36:38 +02:00

Made gettext work on Debian and updated some documentation

This commit is contained in:
Adam
2010-10-28 16:25:33 -04:00
parent 257fb256e9
commit b8df88a1bc
5 changed files with 43 additions and 30 deletions
+2 -1
View File
@@ -305,9 +305,10 @@ void Module::SendMessage(BotInfo *from, User *to, const char *fmt, ...)
{
++_nl_msg_cat_cntr;
setenv("LANGUAGE", language.c_str(), 1);
setlocale(LC_ALL, "en_US");
setlocale(LC_ALL, language.c_str()); // This is only required by some systems, but must not be C or POSIX
message = dgettext(this->name.c_str(), fmt);
unsetenv("LANGUAGE");
setlocale(LC_ALL, "");
}
#endif