1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00
Also check the lang in case insensitive
This commit is contained in:
Daniel 2022-03-14 14:28:38 -03:00
parent 33e7f7384e
commit 2a9630258f
22658 changed files with 3562773 additions and 3562767 deletions

View file

@ -16,17 +16,23 @@ if (!empty($_GET['lang'])) {
function __($str, $allowHTML = false) {
global $t;
if (empty($t[$str])) {
if ($allowHTML) {
return $str;
}
return str_replace(array("'", '"', "<", '>'), array('&apos;', '&quot;', '&lt;', '&gt;'), $str);
} else {
if ($allowHTML) {
return $t[$str];
}
return str_replace(array("'", '"', "<", '>'), array('&apos;', '&quot;', '&lt;', '&gt;'), $t[$str]);
if (!isset($t_insensitive)) {
$t_insensitive = array_change_key_case($t);
}
$return = $str;
if (!empty($t[$str])) {
$return = $t[$str];
} else if (!empty($t_insensitive[strtolower($str)])) {
$return = $t_insensitive[strtolower($str)];
}
if ($allowHTML) {
return $return;
}
return str_replace(array("'", '"', "<", '>'), array('&apos;', '&quot;', '&lt;', '&gt;'), $return);
}
function isRTL() {