Commit 0df3de63 authored by Bastien Le Querrec's avatar Bastien Le Querrec
Browse files

fallback to UTF8 version of locale before failing

parent 65ff19eb
...@@ -58,7 +58,11 @@ class Controller ...@@ -58,7 +58,11 @@ class Controller
putenv("LANGUAGE=".$lang); putenv("LANGUAGE=".$lang);
if (!setlocale(LC_ALL, $lang)) { if (!setlocale(LC_ALL, $lang)) {
echo "<!-- setlocale $lang failed -->"; // try the UTF8 version
putenv("LC_MESSAGES=".$lang.".utf8");
putenv("LANG=".$lang.".utf8");
putenv("LANGUAGE=".$lang.".utf8");
if (!setlocale(LC_ALL, $lang.".utf8")) echo "<!-- setlocale $lang failed -->";
} }
if (!textdomain("messages")) { if (!textdomain("messages")) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment