Skip to content

Commit

Permalink
Use ltb-common for detect language functionnality
Browse files Browse the repository at this point in the history
  • Loading branch information
coudot committed Oct 30, 2024
1 parent 2071627 commit 6d9eb5d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 39 deletions.
3 changes: 1 addition & 2 deletions htdocs/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@
#==============================================================================
# Language
#==============================================================================
require_once("../lib/detectbrowserlanguage.php");
# Available languages
$files = glob("../lang/*.php");
$languages = str_replace(".inc.php", "", $files);
$languages = str_replace("../lang/", "", $languages);
$lang = detectLanguage($lang, $allowed_lang ? array_intersect($languages, $allowed_lang) : $languages);
$lang = \Ltb\Language::detect_language($lang, $allowed_lang ? array_intersect($languages,$allowed_lang) : $languages);
require_once("../lang/$lang.inc.php");
if (file_exists("../conf/$lang.inc.php")) {
require_once("../conf/$lang.inc.php");
Expand Down
37 changes: 0 additions & 37 deletions lib/detectbrowserlanguage.php

This file was deleted.

0 comments on commit 6d9eb5d

Please sign in to comment.