summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/init.php8
-rw-r--r--inc/plugin.php1
-rw-r--r--inc/template.php5
3 files changed, 12 insertions, 2 deletions
diff --git a/inc/init.php b/inc/init.php
index 4ff239787..c7f9a406d 100644
--- a/inc/init.php
+++ b/inc/init.php
@@ -259,6 +259,11 @@ function init_paths(){
$conf['media_changelog'] = $conf['metadir'].'/_media.changes';
}
+/**
+ * Load the language strings
+ *
+ * @param string $langCode language code, as passed by event handler
+ */
function init_lang($langCode) {
//prepare language array
global $lang;
@@ -271,6 +276,9 @@ function init_lang($langCode) {
require(DOKU_INC."inc/lang/$langCode/lang.php");
}
}
+ if (file_exists(DOKU_CONF."lang/$langCode/lang.php")) {
+ require(DOKU_CONF."lang/$langCode/lang.php");
+ }
}
/**
diff --git a/inc/plugin.php b/inc/plugin.php
index 7de4fbd74..dd374a4a4 100644
--- a/inc/plugin.php
+++ b/inc/plugin.php
@@ -124,6 +124,7 @@ class DokuWiki_Plugin {
// don't include once, in case several plugin components require the same language file
@include($path.'en/lang.php');
if ($conf['lang'] != 'en') @include($path.$conf['lang'].'/lang.php');
+ @include(DOKU_CONF.'plugin_lang/'.$this->getPluginName().'/'.$conf['lang'].'/lang.php');
$this->lang = $lang;
$this->localised = true;
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 <andi@splitbrain.org>
*/
function tpl_mediaContent($fromajax = false, $sort='natural') {