aboutsummaryrefslogtreecommitdiffstats
path: root/langs.inc.php
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2012-05-24 07:10:51 +0000
committerRomain d'Alverny <rda@mageia.org>2012-05-24 07:10:51 +0000
commitaa32a920f8a3852b8e0ac7d9b17fee04d653a5f7 (patch)
tree3bd9fc7d5136c0326168edf820d0012dc83f019a /langs.inc.php
parentf750a8c422db9052de8269a3dc6f5d5fd6365124 (diff)
downloadwww-aa32a920f8a3852b8e0ac7d9b17fee04d653a5f7.tar
www-aa32a920f8a3852b8e0ac7d9b17fee04d653a5f7.tar.gz
www-aa32a920f8a3852b8e0ac7d9b17fee04d653a5f7.tar.bz2
www-aa32a920f8a3852b8e0ac7d9b17fee04d653a5f7.tar.xz
www-aa32a920f8a3852b8e0ac7d9b17fee04d653a5f7.zip
new, lower-level _d() to return localized _data_; rewritten _t() on top of it
Diffstat (limited to 'langs.inc.php')
-rw-r--r--langs.inc.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/langs.inc.php b/langs.inc.php
index 909fe5e29..23103f051 100644
--- a/langs.inc.php
+++ b/langs.inc.php
@@ -150,13 +150,17 @@ S;
* Solution? rethink the whole i18n thing in an integrated one.
*/
function _t($s = null, $opt = null, $post = ' ') {
+ return _d($s, $opt) . $post;
+}
+
+function _d($s = null, $opt = null) {
if (!is_null($opt))
$_t = $opt;
else {
global $_t;
}
- return ($s == '' ? '---' : (array_key_exists($s, $_t) ? $_t[$s] : $s)) . $post;
+ return ($s == '' ? '---' : (array_key_exists($s, $_t) ? $_t[$s] : $s));
}
/**