From 38fb1fc7a9bbb1e70f0f24352891601b2e0856d6 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Tue, 13 May 2014 21:57:50 +0200 Subject: extend lang file cascade, so users can override some lang strings Fixes #692 --- inc/template.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'inc/template.php') diff --git a/inc/template.php b/inc/template.php index 35b54b4c3..f8ec637b3 100644 --- a/inc/template.php +++ b/inc/template.php @@ -1285,8 +1285,8 @@ function tpl_getLang($id) { // don't include once @include($path.'en/lang.php'); if($conf['lang'] != 'en') @include($path.$conf['lang'].'/lang.php'); + @include(DOKU_CONF.'template_lang/'.$conf['template'].'/'.$conf['lang'].'/lang.php'); } - return $lang[$id]; } @@ -1307,7 +1307,7 @@ function tpl_locale_xhtml($id) { function tpl_localeFN($id) { $path = tpl_incdir().'lang/'; global $conf; - $file = DOKU_CONF.'/template_lang/'.$conf['template'].'/'.$conf['lang'].'/'.$id.'.txt'; + $file = DOKU_CONF.'template_lang/'.$conf['template'].'/'.$conf['lang'].'/'.$id.'.txt'; if (!@file_exists($file)){ $file = $path.$conf['lang'].'/'.$id.'.txt'; if(!@file_exists($file)){ @@ -1329,6 +1329,7 @@ function tpl_localeFN($id) { * * @triggers MEDIAMANAGER_CONTENT_OUTPUT * @param bool $fromajax - set true when calling this function via ajax + * @param string $sort * @author Andreas Gohr */ function tpl_mediaContent($fromajax = false, $sort='natural') { -- cgit v1.2.3