function init_prepend_l10n() { # Loading locales for detected language $dlang = http::getAcceptLanguages(); foreach ($dlang as $l) { if ($l == 'en' || l10n::set(dirname(__FILE__) . '/../locales/' . $l . '/main') !== false) { l10n::lang($l); break; } } }