diff options
author | Tim Roes <mail@timroes.de> | 2012-05-07 17:08:35 +0200 |
---|---|---|
committer | Tim Roes <mail@timroes.de> | 2012-05-07 17:08:35 +0200 |
commit | efa78c8638547cab77a37006e7f86aed792a1609 (patch) | |
tree | 492804d80b28f8e32785b3648d9e03e77804b50f /inc/pageutils.php | |
parent | ae992f53831c105d6deacfef79d7723b22a00033 (diff) | |
parent | f774b92a94947b3eabd64919b6b4ba74f9c4b5fd (diff) | |
download | rpg-efa78c8638547cab77a37006e7f86aed792a1609.tar.gz rpg-efa78c8638547cab77a37006e7f86aed792a1609.tar.bz2 |
Merge branch 'master' of https://github.com/splitbrain/dokuwiki
Diffstat (limited to 'inc/pageutils.php')
-rw-r--r-- | inc/pageutils.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/inc/pageutils.php b/inc/pageutils.php index db00258e2..c94d14624 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -355,19 +355,21 @@ function mediaFN($id, $rev=''){ } /** - * Returns the full filepath to a localized textfile if local + * Returns the full filepath to a localized file if local * version isn't found the english one is returned * + * @param string $id The id of the local file + * @param string $ext The file extension (usually txt) * @author Andreas Gohr <andi@splitbrain.org> */ -function localeFN($id){ +function localeFN($id,$ext='txt'){ global $conf; - $file = DOKU_CONF.'/lang/'.$conf['lang'].'/'.$id.'.txt'; + $file = DOKU_CONF.'/lang/'.$conf['lang'].'/'.$id.'.'.$ext; if(!@file_exists($file)){ - $file = DOKU_INC.'inc/lang/'.$conf['lang'].'/'.$id.'.txt'; + $file = DOKU_INC.'inc/lang/'.$conf['lang'].'/'.$id.'.'.$ext; if(!@file_exists($file)){ //fall back to english - $file = DOKU_INC.'inc/lang/en/'.$id.'.txt'; + $file = DOKU_INC.'inc/lang/en/'.$id.'.'.$ext; } } return $file; |