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 /lib/plugins | |
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 'lib/plugins')
-rw-r--r-- | lib/plugins/syntax.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/plugins/syntax.php b/lib/plugins/syntax.php index 05b0dc466..12451f636 100644 --- a/lib/plugins/syntax.php +++ b/lib/plugins/syntax.php @@ -188,10 +188,13 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode { 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; } |