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/pageutils.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/pageutils.php')
-rw-r--r-- | inc/pageutils.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/inc/pageutils.php b/inc/pageutils.php index 42a485bdf..5d24c12bb 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -344,10 +344,13 @@ function mediaFN($id){ */ function localeFN($id){ global $conf; - $file = DOKU_INC.'inc/lang/'.$conf['lang'].'/'.$id.'.txt'; + $file = DOKU_CONF.'/lang/'.$conf['lang'].'/'.$id.'.txt'; if(!@file_exists($file)){ - //fall back to english - $file = DOKU_INC.'inc/lang/en/'.$id.'.txt'; + $file = DOKU_INC.'inc/lang/'.$conf['lang'].'/'.$id.'.txt'; + if(!@file_exists($file)){ + //fall back to english + $file = DOKU_INC.'inc/lang/en/'.$id.'.txt'; + } } return $file; } |