diff --git a/CHANGELOG.md b/CHANGELOG.md index 951e6c7..b488ee4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ Changelog ========= +1.2.5 +---- +* Import `$app_list_strings` and `$app_strings` as global variables on SugarCRM load. + 1.2.4 ----- * Fix call to Activity class when it doesn't exists on older SugarCRM version. diff --git a/src/EntryPoint.php b/src/EntryPoint.php index fcf755f..a6bac3d 100644 --- a/src/EntryPoint.php +++ b/src/EntryPoint.php @@ -308,6 +308,14 @@ private function loadSugarEntryPoint() // 2. Get the "autoloader" require_once('include/entryPoint.php'); + // Set language globally + if (empty($current_language)) { + $current_language = $sugar_config['default_language']; + } + + $app_list_strings = return_app_list_strings_language($current_language); + $app_strings = return_application_language($current_language); + // Set all variables as Global to be able to access $sugar_config for example // Even the GLOBALS one ! Because I save it locally and it could disappear later $this->defineVariablesAsGlobal(