X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FCore%2FL10n.php;h=8e6ee171c86cca18c5e4d302b1a4ce95e4797857;hb=0d1fa70e2ecb372d158871285e0cda5f6d77194a;hp=8354fc9dfe370a73c0bdb63dbb6092c15445c2ad;hpb=04d620fc2f567d32b50f5d5b0974acafeb072177;p=friendica.git diff --git a/src/Core/L10n.php b/src/Core/L10n.php index 8354fc9dfe..8e6ee171c8 100644 --- a/src/Core/L10n.php +++ b/src/Core/L10n.php @@ -1,4 +1,23 @@ . + * + */ namespace Friendica\Core; @@ -14,6 +33,9 @@ use Psr\Log\LoggerInterface; */ class L10n { + /** @var string The default language */ + const DEFAULT = 'en'; + /** * A string indicating the current language used for translation: * - Two-letter ISO 639-1 code. @@ -45,7 +67,7 @@ class L10n $this->dba = $dba; $this->logger = $logger; - $this->loadTranslationTable(L10n::detectLanguage($server, $get, $config->get('system', 'language', 'en'))); + $this->loadTranslationTable(L10n::detectLanguage($server, $get, $config->get('system', 'language', self::DEFAULT))); $this->setSessionVariable($session); $this->setLangFromSession($session); } @@ -139,7 +161,7 @@ class L10n * * @return string The two-letter language code */ - public static function detectLanguage(array $server, array $get, string $sysLang = 'en') + public static function detectLanguage(array $server, array $get, string $sysLang = self::DEFAULT) { $lang_variable = $server['HTTP_ACCEPT_LANGUAGE'] ?? null;