<?php
# -- BEGIN LICENSE BLOCK ----------------------------------
#
# This file is part of Dotclear 2.
#
# Copyright (c) 2003-2008 Olivier Meunier and contributors
# Licensed under the GPL version 2.0 license.
# See LICENSE file or
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
#
# -- END LICENSE BLOCK ------------------------------------

# This file will be included by l10n plugins

if (!isset($l10n_admin_mode) || !isset($my_lang)) {
	return;
}

$_lang =& $GLOBALS['_lang'];

if ($_lang != $my_lang) {
	return;
}

if ($l10n_admin_mode)
{
	l10n::set($plugin_root.'/po/date');
	l10n::set($plugin_root.'/po/main');
	l10n::set($plugin_root.'/po/plugins');
	
	# Loading resources file
	$f = l10n::getFilePath($plugin_root,'resources.php','');
	if ($f) {
		global $__resources;
		require $f;
	}
	unset($f);
	
	foreach ($GLOBALS['__resources']['help'] as $k => &$v) {
		if (file_exists($plugin_root.'/help/'.$k.'.html')) {
			$v = $plugin_root.'/help/'.$k.'.html';
		}
	}
}
else
{
	l10n::set($plugin_root.'/po/date');
	l10n::set($plugin_root.'/po/public');
	l10n::set($plugin_root.'/po/plugins');
}
?>