aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2005-06-21 19:32:17 +0000
committerplegall <plg@piwigo.org>2005-06-21 19:32:17 +0000
commita86321eab598ad26b08e4ef72a777f7a5e477acc (patch)
tree41745fe2a47e7322a1ef418401aaffd7c741ddc4 /include
parent743efaf1121dc782f4c551a4b08e7afb145ebc91 (diff)
- direct communication between templates and language items, without needing
a mapping in the PHP code. git-svn-id: http://piwigo.org/svn/trunk@794 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include')
-rw-r--r--include/template.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/template.php b/include/template.php
index 0c29ae3e7..cc638c044 100644
--- a/include/template.php
+++ b/include/template.php
@@ -330,6 +330,9 @@ class Template {
// replace \ with \\ and then ' with \'.
$code = str_replace('\\', '\\\\', $code);
$code = str_replace('\'', '\\\'', $code);
+
+ // PWG specific : communication between template and $lang
+ $code = preg_replace('/\{lang:([^}]+)\}/e', "l10n('$1')", $code);
// change template varrefs into PHP varrefs