|
From: <var...@us...> - 2021-10-19 13:38:42
|
Revision: 10634
http://sourceforge.net/p/phpwiki/code/10634
Author: vargenau
Date: 2021-10-19 13:38:39 +0000 (Tue, 19 Oct 2021)
Log Message:
-----------
lib/plugin/SystemInfo.php: use user preferences for current language
Modified Paths:
--------------
trunk/lib/plugin/SystemInfo.php
Modified: trunk/lib/plugin/SystemInfo.php
===================================================================
--- trunk/lib/plugin/SystemInfo.php 2021-10-19 13:21:33 UTC (rev 10633)
+++ trunk/lib/plugin/SystemInfo.php 2021-10-19 13:38:39 UTC (rev 10634)
@@ -449,11 +449,15 @@
$available_languages = listAvailableLanguages();
natcasesort($available_languages);
+ global $request;
+ $pref = $request->_prefs;
+ $lang = $pref->get('lang');
+
return sprintf(_("Total of %d languages: "),
count($available_languages))
. implode(', ', $available_languages) . ". "
- . _("Current language") . _(": ") . $GLOBALS['LANG']
- . ((DEFAULT_LANGUAGE != $GLOBALS['LANG'])
+ . _("Current language") . _(": ") . $lang
+ . ((DEFAULT_LANGUAGE != $lang)
? ". " . _("Default language") . _(": ") . DEFAULT_LANGUAGE
: '');
}
@@ -499,8 +503,6 @@
$appname_function = function() { return 'PhpWiki'; };
$version_function = function() { return sprintf('%s', PHPWIKI_VERSION); };
- $current_language_function = function() { return $GLOBALS["LANG"]; };
- $system_language_function = function() { return DEFAULT_LANGUAGE; };
$current_theme_function = function() { return $GLOBALS["WikiTheme"]->_name; };
$system_theme_function = function() { return THEME; };
$dummy_function = function() { return 'dummy'; };
@@ -508,8 +510,6 @@
$availableargs = // name => callback + 0 args
array('appname' => $appname_function,
'version' => $version_function,
- 'current_language' => $current_language_function,
- 'system_language' => $system_language_function,
'current_theme' => $current_theme_function,
'system_theme' => $system_theme_function,
// more here or as method.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|