X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fpgettext.php;h=9b541e8e3c77f6fe1cc3bd776a0490145af3ffe7;hb=fd5d058156185c6c02c1285a794139d07f4d13ce;hp=0acbb02cff4f5737b24b2e5bcf87f7e22489cfae;hpb=2fc2a1a228dbfada803618bdc4714f4ffaa9d149;p=friendica.git diff --git a/include/pgettext.php b/include/pgettext.php index 0acbb02cff..9b541e8e3c 100644 --- a/include/pgettext.php +++ b/include/pgettext.php @@ -10,6 +10,8 @@ * */ +use Friendica\Core\Config; + require_once("include/dba.php"); if(! function_exists('get_browser_language')) { @@ -42,17 +44,17 @@ function get_browser_language() { // check if we have translations for the preferred languages and pick the 1st that has for ($i=0; $iconfig['system']['language'])) ? $a->config['system']['language'] : 'en'); + return Config::get('system', 'language', 'en'); }} @@ -98,7 +100,7 @@ if(! function_exists('load_translation_table')) { * @param string $lang language code to load */ function load_translation_table($lang) { - global $a; + $a = get_app(); $a->strings = array(); // load enabled plugins strings @@ -189,4 +191,4 @@ function get_available_languages() { } } return $langs; -} \ No newline at end of file +}