aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/ChangeLog5
-rw-r--r--include/template.php3
2 files changed, 8 insertions, 0 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 4c6b71d8c..62dc21064 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,5 +1,10 @@
2005-06-21 Pierrick LE GALL
+ * direct communication between templates and language items,
+ without needing a mapping in the PHP code.
+
+2005-06-21 Pierrick LE GALL
+
* new function get_name_from_file to centralize the construction
of displayed name from the filename
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