Use server language as fallback if client's "lang" key is not defined.

This commit is contained in:
Arkshine
2014-08-07 14:10:31 +02:00
parent 8c591bf065
commit c03271c856
2 changed files with 14 additions and 1 deletions

View File

@ -79,8 +79,12 @@ const char *translate(AMX *amx, cell amxaddr, const char *key)
get_amxstring_r(amx, amxaddr, name, 3);
pLangName = name;
}
if (!pLangName || !isalpha(pLangName[0]))
pLangName = "en";
{
pLangName = amxmodx_language->string;
}
//next parameter!
def = g_langMngr.GetDef(pLangName, key, status);