From e6cecb0872ef457f44529edbc736aba3dc3ac258 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Sun, 26 Dec 2010 23:03:16 +0100 Subject: 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. --- inc/pageutils.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'inc/pageutils.php') 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; } -- cgit v1.2.3