/*
* Method one: additional push
*/
$locale = array();
// Check if a locale file is available that match the selected locale.
if (file_exists(INFUSIONS."figurelib/locale/".LANGUAGE."/locale_figurelib.php" )) {
// Load the locale file matching selection.
include INFUSIONS."figurelib/locale/".LANGUAGE."/locale_figurelib.php"
} else {
// Load the default locale file.
include INFUSIONS."figurelib/locale/English/locale_figurelib.php";
}
$locale += fusion_get_locale();
print_p($locale); // Here, $locale is a string, and accessible globally.
/**
* Method two: load into library on refresh.
* File: your_infusion/infusion_db.php*
*
* Add the lines:
*/
$locale = \PHPFusion\Locale::__getInstance('Default');
$locale::setLocale(file_exists(INFUSIONS."figurelib/locale/".LANGUAGE.".php") ? INFUSIONS."figurelib/locale/".LANGUAGE."/locale_figurelib.php" : INFUSIONS."figurelib/locale/English/locale_figurelib.php");
// This method will set the locale values into the instance of locale.
// All your files can access the newly added library locale values ....
// In any file...
$my_total_locale = fusion_get_locale(); // will print figurelib locale as well because it was added.
print_p($my_total_locale);
Category Forum
Modifications and Requests - 9Labels
None yet
Statistics
3 participants
Notifications
You are not receiving notifications from this thread.
Related Questions