-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlang.php
More file actions
35 lines (31 loc) · 762 Bytes
/
lang.php
File metadata and controls
35 lines (31 loc) · 762 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
$lang_sel = "cat";
if(isSet($_GET['lang']))
{
$lang_sel = $_GET['lang'];
}
switch ($lang_sel) {
case 'cat':
break;
case 'es':
break;
case 'en':
break;
default:
$lang_sel = "cat";
}
include_once 'lang.'.$lang_sel.'.php';
/*
$lang_dump = "<?php\n\$lang = ".var_export($lang, true).";\n?>";
$lang_dump = str_replace("\\'", "#$%&", $lang_dump);
$lang_dump = str_replace("'", "\"", $lang_dump);
$lang_dump = str_replace("#$%&", "'", $lang_dump);
$lang_dump = html_entity_decode($lang_dump);
file_put_contents(dirname(__FILE__)."/langs/lang.".$lang_sel.".php",$lang_dump);
*/
foreach ($lang as $key => $value)
{
$aux = htmlentities($value,ENT_NOQUOTES,'UTF-8',false);
$lang[$key] = str_replace(array('<','>'),array('<','>'), $aux);
}
?>