1
0
mirror of https://github.com/anope/anope.git synced 2026-07-03 05:53:12 +02:00

Split up db/conf/lib/locale install directories, and allow alternate ones to be specified at runtime

This commit is contained in:
Adam
2012-05-06 21:43:50 -04:00
parent eb0e07d564
commit 675b113c3e
22 changed files with 101 additions and 48 deletions
+3 -3
View File
@@ -31,7 +31,7 @@ void InitLanguages()
while (sep.GetToken(language))
{
if (!IsFile("languages/" + language + "/LC_MESSAGES/anope.mo"))
if (!IsFile(locale_dir + "/" + language + "/LC_MESSAGES/anope.mo"))
{
Log() << "Error loading language " << language << ", file does not exist!";
}
@@ -42,10 +42,10 @@ void InitLanguages()
}
}
if (!bindtextdomain("anope", (services_dir + "/languages/").c_str()))
if (!bindtextdomain("anope", locale_dir.c_str()))
Log() << "Error calling bindtextdomain, " << Anope::LastError();
else
Log(LOG_DEBUG) << "Successfully bound anope to " << services_dir << "/languages/";
Log(LOG_DEBUG) << "Successfully bound anope to " << locale_dir;
setlocale(LC_ALL, "");
#else