Many web developers who use PHPMaker thought that the Regional Settings cannot be implemented properly in the web applications that generated by it. This could be happened since by default PHPMaker will use the default setting in the generated configuration (ewcg*.php) file, moreover the default setting in the related .xml language file also will use the default setting in that ewcfg*.php file.
Now let's take a look at that ewcfg*.php file, you will find the following comment in that file (just ignore the code below the following comments):
/** * Numeric and monetary formatting options * Note: DO NOT CHANGE THE FOLLOWING $DEFAULT_* VARIABLES! * If you want to use custom settings, customize the language file, * set "use_system_locale" to "0" to override localeconv and customize the * phrases under the <locale> node for ew_FormatCurrency/Number/Percent functions * Also read http://www.php.net/localeconv for description of the constants */
As the comment said above, PHPMaker recommended us to customize the language file (that located in C:\Program Files\PHPMaker 10\languages folder), instead of customizing the setting above. If you want to use custom settings, customize the language file, set use_system_locale to 0 to override localeconv and customize the phrases under the
Now let's assume that we use English as the main/default language in our web application. So, open the english.xml file from that folder, and by default you will see this code at the fifth line from top of file:
<phrase id="use_system_locale" value="1"/><!-- *** change to "0" to disable system locale and use the following settings *** -->
As PHPMaker said from the comment in that .xml file above (again), we should change it become:
<phrase id="use_system_locale" value="0"/><!-- *** change to "0" to disable system locale and use the following settings *** -->
That change means we will use the configuration of Regional Setting based on the .xml language file, and ignore the default setting from the ewcfg*.php file. Customize the phrases value inside the
In order to use the Regional Settings from the .xml language files, then make sure you do not enable Set locale under PHP -> General Options of PHPMaker application.
Of course, don't forget also to regenerate english.xml (and the other .xml language file; if any) after making that customization above to apply the change in your generated web applications.