diff options
author | Michael Hamann <michael@content-space.de> | 2010-12-26 23:03:16 +0100 |
---|---|---|
committer | Michael Hamann <michael@content-space.de> | 2010-12-29 21:58:39 +0100 |
commit | e6cecb0872ef457f44529edbc736aba3dc3ac258 (patch) | |
tree | 9084db13373f0d6ef381642628d2186d1056f4df /inc/plugin.php | |
parent | 650ebc14deceda2e5807bb777a04ee3d476429be (diff) | |
download | rpg-e6cecb0872ef457f44529edbc736aba3dc3ac258.tar.gz rpg-e6cecb0872ef457f44529edbc736aba3dc3ac258.tar.bz2 |
Language files can now be customized in the conf/ directory
As suggested by Robin Getz locale .txt files can now be duplicated and
changed in the conf/lang/ directory and conf/plugin_lang/$plugin/
directory for plugins.
Diffstat (limited to 'inc/plugin.php')
-rw-r--r-- | inc/plugin.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/inc/plugin.php b/inc/plugin.php index aff07c1e5..628ae39b0 100644 --- a/inc/plugin.php +++ b/inc/plugin.php @@ -88,10 +88,13 @@ class DokuWiki_Plugin { function localFN($id) { global $conf; $plugin = $this->getPluginName(); - $file = DOKU_PLUGIN.$plugin.'/lang/'.$conf['lang'].'/'.$id.'.txt'; - if(!@file_exists($file)){ - //fall back to english - $file = DOKU_PLUGIN.$plugin.'/lang/en/'.$id.'.txt'; + $file = DOKU_CONF.'/plugin_lang/'.$plugin.'/'.$conf['lang'].'/'.$id.'.txt'; + if (!@file_exists($file)){ + $file = DOKU_PLUGIN.$plugin.'/lang/'.$conf['lang'].'/'.$id.'.txt'; + if(!@file_exists($file)){ + //fall back to english + $file = DOKU_PLUGIN.$plugin.'/lang/en/'.$id.'.txt'; + } } return $file; } |