aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions.inc.php
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2010-03-20 23:14:30 +0000
committerpatdenice <patdenice@piwigo.org>2010-03-20 23:14:30 +0000
commit6e51794b3f225a01f221fcc198b7c802b70ff987 (patch)
tree53b2d672dab4ac0ad20f3bbb4b42b200ae030662 /include/functions.inc.php
parentaf78fa6193f7fec2bad09315aa1fb512d3c9a6fc (diff)
feature 1522: Move local css local files and local language files to local directory.
Add $conf['template_force_compile'] to help developpers. git-svn-id: http://piwigo.org/svn/trunk@5208 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/functions.inc.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php
index 72bd807d0..c837232b7 100644
--- a/include/functions.inc.php
+++ b/include/functions.inc.php
@@ -583,7 +583,7 @@ function redirect_html( $url , $msg = '', $refresh_time = 0)
$user = build_user( $conf['guest_id'], true);
load_language('common.lang');
trigger_action('loading_lang');
- load_language('local.lang', '', array('no_fallback'=>true) );
+ load_language('lang', PHPWG_ROOT_PATH.'local/', array('no_fallback'=>true, 'local'=>true) );
$template = new Template(PHPWG_ROOT_PATH.'themes', get_default_theme());
}
else
@@ -1168,6 +1168,7 @@ function get_pwg_charset()
* return - if true the file content is returned otherwise the file is evaluated as php
* target_charset -
* no_fallback - the language must be respected
+ * local - if true, get local language file
* @return boolean success status or a string if options['return'] is true
*/
function load_language($filename, $dirname = '',
@@ -1217,7 +1218,10 @@ function load_language($filename, $dirname = '',
$source_file = '';
foreach ($languages as $language)
{
- $f = $dirname.$language.'/'.$filename;
+ $f = @$options['local'] ?
+ $dirname.$language.'.'.$filename:
+ $dirname.$language.'/'.$filename;
+
if (file_exists($f))
{
$source_file = $f;