diff options
author | neoraider <devnull@localhost> | 2006-12-09 02:18:00 +0100 |
---|---|---|
committer | neoraider <devnull@localhost> | 2006-12-09 02:18:00 +0100 |
commit | 7be63518bdb86fb747dda20918ef6eab3d30e40c (patch) | |
tree | e9239af6d9efa6d7a2129adb71ca77fb25a0f59d /code/subst.inc.php | |
parent | fa39bfd963d7d05335d968b0efdfd9bb9a40f132 (diff) | |
download | neon-7be63518bdb86fb747dda20918ef6eab3d30e40c.tar neon-7be63518bdb86fb747dda20918ef6eab3d30e40c.zip |
?bersetzung vereinfacht; alle Seiten ?bersetzt
Diffstat (limited to 'code/subst.inc.php')
-rw-r--r-- | code/subst.inc.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/code/subst.inc.php b/code/subst.inc.php new file mode 100644 index 0000000..9696ec9 --- /dev/null +++ b/code/subst.inc.php @@ -0,0 +1,13 @@ +<?PHP + $GLOBALS['messages'] = array(); + + if($GLOBALS['config']['language'] != 'en') @include('lang/' . $GLOBALS['config']['language'] . '.inc.php'); + + function Subst($data) { + $subst = array_map(create_function('$key', 'return \'(\\{\\{\' . $key . \'\\}\\})\';'), array_keys($GLOBALS['messages'])); + + $data = preg_replace($subst, $GLOBALS['messages'], $data); + + return preg_replace('({{(.+?)}})', '$1', $data); + } +?> |