]>
Commit | Line | Data |
---|---|---|
964dd0bc JW |
1 | <?php |
2 | $LANG = array(); | |
3 | ||
4 | if(!isset($language)) | |
5 | $language = "en"; | |
6 | ||
7 | // just in case, even though we should probably die if we find / in it | |
8 | $language = str_replace("/", "", $language); | |
9 | ||
10 | require_once("../lang/" . $language . ".php"); | |
11 | ||
12 | ||
13 | function m($str) { | |
14 | global $LANG, $language; | |
15 | ||
16 | if(!isset($LANG[$language])) { | |
17 | return $str; | |
18 | } | |
19 | ||
20 | if(!isset($LANG[$language][$str])) { | |
21 | // generate_mstring($str); | |
22 | return $str; | |
23 | } | |
24 | // generate_mstring($str, $LANG[$language][$str]); | |
25 | ||
26 | return $LANG[$language][$str]; | |
27 | } | |
28 | ||
29 | function generate_mstring($str, $res = null) { | |
30 | global $generated_output; | |
31 | $res = addcslashes(is_null($res)?$str:$res, '\'\\'); | |
32 | $generated_output .= | |
33 | "'$str' => '$res',\n"; | |
34 | ||
35 | } | |
36 | ||
37 | ?> |