1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
<?php
/**
* @file CustomLocaleAction.inc.php
*
* Copyright (c) 2003-2009 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* @class CustomLocaleAction
* @ingroup plugins_generic_customLocale
*
* @brief Perform various tasks related to customization of locale strings.
*/
// $Id$
class CustomLocaleAction {
function getLocaleFiles($locale) {
if (!Locale::isLocaleValid($locale)) return null;
$localeFiles = array(Locale::getMainLocaleFilename($locale));
$plugins =& PluginRegistry::loadAllPlugins();
foreach (array_keys($plugins) as $key) {
$plugin =& $plugins[$key];
$localeFile = $plugin->getLocaleFilename($locale);
if (!empty($localeFile)) $localeFiles[] = $localeFile;
unset($plugin);
}
return $localeFiles;
}
function isLocaleFile($locale, $filename) {
if (in_array($filename, CustomLocaleAction::getLocaleFiles($locale))) return true;
return false;
}
}
?>
|