Page 1 of 1

Setting config.php to UK locale

Posted: Tue Nov 30, 2010 7:23 pm
by luminous
On a site that I am developing I am having issues getting all of the site to recognise that it should be showing £ sterling.  In the config.php file there is a line that allows you to set the locale setting:

Code: Select all

#------------------------
#Locale/Encoding Settings
#------------------------

#Locale to use for various default date handling functions, etc.  Leaving
#this blank will use the server's default.  This might not be good if the
#site is hosted in a different country than it's intended audience.
$config['locale'] = 'en-UK';

#In almost all cases, default_encoding should be empty (which defaults to utf-8)
#and admin_encoding should be utf-8.  If you'd like this to be different, change
#both.  Keep in mind, however, that the admin interface translations are all in
#utf-8, and will be converted on the fly to match the admin_encoding.  This
#could seriously slow down the admin interfaces for users.
$config['default_encoding'] = 'utf-8';
$config['admin_encoding'] = 'utf-8';
Now as you can see I have set the locale to en-UK, but this does not appear to be working.  I've searched the support documentation and forums both here and on my host but cannot find a list of valid locale settings.  Is my setting correct, or how can I find out?

Re: Settling config.php to UK locale

Posted: Tue Nov 30, 2010 10:22 pm
by M@rtijn
When I google 'locale settings' I get lots of usefull pages, all showing me that the correct notation should be "en_UK"

Re: Settling config.php to UK locale

Posted: Tue Nov 30, 2010 10:24 pm
by luminous
Thanks, will give that a whirl.  I won't tell you how many google searches I did and got naff all that was useful.....  I must have been over complicating things as I was doing searches with config.php etc...

Re: Settling config.php to UK locale

Posted: Tue Nov 30, 2010 10:30 pm
by luminous
Ah well, I've changed it to en-UK, and destination based shipping is still showing dollars in the admin interface.  I've had a quick look at its code and it does try to load in the currency symbol based on locale settings...but meh.

I'll just work around the issue.  Thanks for trying to help :)

Re: Settling config.php to UK locale

Posted: Wed Dec 01, 2010 12:08 am
by Dr.CSS
If you are using calguy1000 modules to do e-com you may want to look at Extensions » Calguys Ecommerce Base (second tab) General Settings...

Re: Settling config.php to UK locale

Posted: Wed Dec 01, 2010 7:52 am
by luminous
Dr.CSS wrote: If you are using calguy1000 modules to do e-com you may want to look at Extensions » Calguys Ecommerce Base (second tab) General Settings...
Thanks for the suggestion :)  I've already told CMSMS to use English when I installed it, then also set Calguys modules to United Kingdom.  Since things were still not working perfectly I thought I would try the config file.  I'll take another look at things and then post about the specific module in the right section if there is still an issue.

Re: Setting config.php to UK locale

Posted: Wed Mar 02, 2011 12:14 pm
by scooper
I know it's an old thread but just in case anyone is passing the locale for the UK is in fact en_GB and not en_UK (which I think might be the Ukraine).