From: nupplaPhil Date: Sat, 18 Jan 2020 19:55:41 +0000 (+0100) Subject: Move L10n::getCurrentLang() calls to DI::l10n()->getCurrentLang() calls X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=d83f6335ebff1b6846b2ea3e1c09eab1fa01e5d0;p=friendica.git Move L10n::getCurrentLang() calls to DI::l10n()->getCurrentLang() calls --- diff --git a/mod/settings.php b/mod/settings.php index 412748aab5..4a19e3e849 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -1165,7 +1165,7 @@ function settings_content(App $a) } /* Installed langs */ - $lang_choices = L10n::getAvailableLanguages(); + $lang_choices = DI::l10n()->getAvailableLanguages(); /// @TODO Fix indending (or so) $o .= Renderer::replaceMacros($stpl, [ diff --git a/src/Module/Admin/Site.php b/src/Module/Admin/Site.php index aab66a7221..9a7aa5956c 100644 --- a/src/Module/Admin/Site.php +++ b/src/Module/Admin/Site.php @@ -414,7 +414,7 @@ class Site extends BaseAdminModule parent::content($parameters); /* Installed langs */ - $lang_choices = L10n::getAvailableLanguages(); + $lang_choices = DI::l10n()->getAvailableLanguages(); if (strlen(Config::get('system', 'directory_submit_url')) && !strlen(Config::get('system', 'directory'))) { diff --git a/src/Module/Install.php b/src/Module/Install.php index 4b0809e1f9..2e8d088b08 100644 --- a/src/Module/Install.php +++ b/src/Module/Install.php @@ -255,7 +255,7 @@ class Install extends BaseModule case self::SITE_SETTINGS: /* Installed langs */ - $lang_choices = L10n::getAvailableLanguages(); + $lang_choices = DI::l10n()->getAvailableLanguages(); $tpl = Renderer::getMarkupTemplate('install_settings.tpl'); $output .= Renderer::replaceMacros($tpl, [ diff --git a/src/Util/Temporal.php b/src/Util/Temporal.php index 4bc2b03d1b..9df0413fbc 100644 --- a/src/Util/Temporal.php +++ b/src/Util/Temporal.php @@ -219,7 +219,7 @@ class Temporal // First day of the week (0 = Sunday) $firstDay = DI::pConfig()->get(local_user(), 'system', 'first_day_of_week', 0); - $lang = substr(L10n::getCurrentLang(), 0, 2); + $lang = substr(DI::l10n()->getCurrentLang(), 0, 2); // Check if the detected language is supported by the picker if (!in_array($lang, diff --git a/update.php b/update.php index 330e6da10d..6d57543838 100644 --- a/update.php +++ b/update.php @@ -300,7 +300,7 @@ function update_1298() $keys = ['gender', 'marital', 'sexual']; foreach ($keys as $translateKey) { $allData = DBA::select('profile', ['id', $translateKey]); - $allLangs = L10n::getAvailableLanguages(); + $allLangs = DI::l10n()->getAvailableLanguages(); $success = 0; $fail = 0; foreach ($allData as $key => $data) {