PDA

View Full Version : How to adjust locale settings?



megaloman
22nd March 2007, 11:46 AM
Hello guys,

I have a simple problem - I know how to change global locale settings from en_US to en_GB - it's not a problem, but... now I want to get rid of AM/PM in my time format :) so my question is simple - how to adjust locale settings? or how to edit locale files?


$ locale --category-name LC_TIME

shows me my settings, but I don't know how to change them - any ideas?

Thanks in advance :)

sideways
22nd March 2007, 12:31 PM
I just posted on how to set the first day of the week to monday, I guess it's the same principle, you modify the locale definition file.

http://www.fedoraforum.org/forum/showpost.php?p=765158&postcount=6

(Note, if glibc is updated it may overwrite the new settings)

sideways
22nd March 2007, 01:39 PM
One more point.

The locale files are not easy to read because settings are given as unicode strings, so in the LC_TIME section, for example, the am_pm string definition is given as


am_pm "<U0041><U004D>";"<U0050><U004D>"

which translates to "am";"pm", as expected.

This page (http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.files/doc/aixfiles/LC_TIME.htm) explains the sections and lists them in the old ascii format, so will be easier to understand.

megaloman
22nd March 2007, 02:41 PM
Thanks for all your help!

I have just solved my problem :)