aboutsummaryrefslogtreecommitdiffstats
path: root/include/help.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-11-25 17:12:28 +0100
committerMario <mario@mariovavti.com>2023-11-25 17:12:28 +0100
commit0fd8e02a884a2b040dca62ab5d9674db5f6a070b (patch)
tree586ee43f32f6f14368c09026f21dcd3244ea24b6 /include/help.php
parent82e704ec5b107823c09f1387e9091adee53a4c2d (diff)
parent55c4bfb67009c598f25b1a8189604bfffa73dfbb (diff)
downloadvolse-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.php9
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 {