diff options
author | Mario <mario@mariovavti.com> | 2023-11-25 17:12:28 +0100 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2023-11-25 17:12:28 +0100 |
commit | 0fd8e02a884a2b040dca62ab5d9674db5f6a070b (patch) | |
tree | 586ee43f32f6f14368c09026f21dcd3244ea24b6 /include/help.php | |
parent | 82e704ec5b107823c09f1387e9091adee53a4c2d (diff) | |
parent | 55c4bfb67009c598f25b1a8189604bfffa73dfbb (diff) | |
download | volse-hubzilla-8.8.tar.gz volse-hubzilla-8.8.tar.bz2 volse-hubzilla-8.8.zip |
Merge branch '8.8RC'8.8
Diffstat (limited to 'include/help.php')
-rw-r--r-- | include/help.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/help.php b/include/help.php index 8a913578a..9e4be57f9 100644 --- a/include/help.php +++ b/include/help.php @@ -1,6 +1,7 @@ <?php use \Michelf\MarkdownExtra; +use CommerceGuys\Intl\Language\LanguageRepository; require_once('include/items.php'); @@ -183,11 +184,11 @@ function preg_callback_help_include($matches) { * * \e boolean \b from_url - true if language from URL overrides browser default */ function determine_help_language() { - $lang_detect = new Text_LanguageDetect(); - // Set this mode to recognize language by the short code like "en", "ru", etc. - $lang_detect->setNameMode(2); - if($lang_detect->languageExists(argv(1))) { + $language_repository = new LanguageRepository; + $languages = $language_repository->getList(); + + if(array_key_exists(argv(1), $languages)) { $lang = argv(1); $from_url = true; } else { |