X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fpgettext.php;h=9b541e8e3c77f6fe1cc3bd776a0490145af3ffe7;hb=ac65423de1586295857b76f0d6900e484acd9461;hp=de7cdda9e8575cfa41a3d117062225666e8e2ca2;hpb=71f9e500141f6c8787a4a648b4aa57448da2097f;p=friendica.git diff --git a/include/pgettext.php b/include/pgettext.php index de7cdda9e8..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