mirror of
https://github.com/ShaYmez/FreeSTAR-Status-Engine.git
synced 2026-06-01 21:54:48 -04:00
Add template doc, fixup rendering locale select
This commit is contained in:
@@ -14,12 +14,13 @@ class LocaleNegotiator
|
||||
*/
|
||||
function __construct($default_language)
|
||||
{
|
||||
$tmp = glob(__DIR__ . '/locale/*' , GLOB_ONLYDIR);
|
||||
$tmp = glob(__DIR__ . '/../locale/*' , GLOB_ONLYDIR);
|
||||
$this->default_language = $default_language;
|
||||
//Works only if the server supports the locale
|
||||
//This basically means $accepted_langs[<lang_code>] = "<lang name>";
|
||||
foreach ($accepted_langs as $key => $value) {
|
||||
$this->accepted_langs[basename($value)] = self::mb_ucfirst(locale_get_display_language($lang, $lang));
|
||||
foreach ($tmp as $key => $value) {
|
||||
$lang = basename($value);
|
||||
$this->accepted_langs[$lang] = self::mb_ucfirst(locale_get_display_language($lang, $lang));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user