Set up Locality, Date Format and Currency

From Phoenix Cart User Guide
Revision as of 08:26, 3 October 2019 by PeterRobert (talk | contribs) (Created page with " If you are in U.S.A. or have installed another language pack the following changes might not be necessary. <br>Open the main language file <br>Tools => Define Languages => e...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

If you are in U.S.A. or have installed another language pack the following changes might not be necessary.
Open the main language file
Tools => Define Languages => english.php
Phoenix is set for U.S.A. English with USD currency and m/d/y date format by default.

Set Up Locality

Find the following lines:

// 'en_US.UTF-8', 'en_US.UTF8', 'enu_usa'
// 'en_GB.UTF-8', 'en_GB.UTF8', 'eng_gb'
// 'en_AU.UTF-8', 'en_AU.UTF8', 'ena_au'
@setlocale(LC_ALL, array('en_US.UTF-8', 'en_US.UTF8', 'enu_usa'));

Change the code within the brackets in the last line to one of the options shown above it.

E.g. for Great Britain change to

@setlocale(LC_ALL, array('en_GB.UTF-8', 'en_GB.UTF8', 'eng_gb'));


Set the Date Format

Find the following lines:

define('DATE_FORMAT_SHORT', '%m/%d/%Y');  // this is used for strftime()
define('DATE_FORMAT', 'm/d/Y'); // this is used for date()
define('JQUERY_DATEPICKER_FORMAT', 'mm/dd/yy'); // see http://docs.jquery.com/UI/Datepicker/formatDate

Change them to:

define('DATE_FORMAT_SHORT', '%d/%m/%Y');  // this is used for strftime()
define('DATE_FORMAT', 'd/m/Y'); // this is used for date()
define('JQUERY_DATEPICKER_FORMAT', 'dd/mm/yy'); // see http://docs.jquery.com/UI/Datepicker/formatDate

Find the following lines:

return substr($date, 3, 2) . substr($date, 0, 2) . substr($date, 6, 4);
} else {
return substr($date, 6, 4) . substr($date, 0, 2) . substr($date, 3, 2);

Change them to:

return substr($date, 0, 2) . substr($date, 3, 2) . substr($date, 6, 4);
} else {
 return substr($date, 6, 4) . substr($date, 3, 2) . substr($date, 0, 2);


Set the Currency

Find the following line:

define('LANGUAGE_CURRENCY', 'USD');

E.g. for Great Britain change to:

define('LANGUAGE_CURRENCY', 'GBP');


To find your 3 letter currency code, internet search ISO 4217 Codes.


Repeat the changes above for the admin main language file, youradmin/includes/languages/english.php
You will need to access this language file using your FTP software e.g. Filezilla - it is not accessible from admin.