X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fpgettext.php;h=335869eda2104ff69a6cd6cbdebab9314ac8038e;hb=de5125a4c72309d5b167916e905eed1cad8d2679;hp=de7cdda9e8575cfa41a3d117062225666e8e2ca2;hpb=a9e90d111d649fd739c44261ebc3b023a554c3d4;p=friendica.git diff --git a/include/pgettext.php b/include/pgettext.php index de7cdda9e8..335869eda2 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')) { @@ -47,12 +49,12 @@ function get_browser_language() { break; } } - if(isset($preferred)) + if (isset($preferred)) { return $preferred; + } // in case none matches, get the system wide configured language, or fall back to English - $a = get_app(); - return ((isset($a->config['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