Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Apr 2012 23:09:19 +0100
From:      Matthew Seaman <>
To:        jbiskofski <>
Subject:   Re: how to add es_MX locale ?
Message-ID:  <>
In-Reply-To: <>
References:  <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

On 18/04/2012 21:27, jbiskofski wrote:
> I dont see it in the response from "locale -a". How can I add this loca=

You'ld have to generate the appropriate locale data files for es_MX.
Look at the equivalents for es_ES in
/usr/share/locale/{es_ES.ISO8859-1,es_ES.ISO8859-15,es_ES.UTF-8} --
although as ISO8859-15 is actually identical to ISO8859-1 apart from the
addition of the Euro (=80) currency symbol you can probably skip that for=


These LC_* files have sources in the following sub-directories of

LC_CTYPE    mklocale
LC_COLLATE  colldef
LC_MONETARY monetdef
LC_NUMERIC  numericdef
LC_TIME     timedef

If you look at the Makefiles in those directories you can see how the
different output files are generated.  Note that where the source would
be the same for many locales, only one source file is used, and the
Makefile copies the result appropriately for other locales.

For example, the LC_CTYPE files for languages written in the latin
alphabet are generated from generic sources in /usr/src/share/mklocale
-- so for the ISO8859-1 character set, the source code is in

Once you've got the es_MX files sorted out, submit your changes as a
diff by using send-pr(1), and try and get a committer interested in
adding them to the tree.  You probably won't need to write many es_MX
specific files -- it could be just monetdef/es_MX.UTF-8.src [*] to
specify the currency -- but you will need to add the right bits to the
Makefiles to get the other es_MX LC_* files properly generated.



[*] I believe UTF-8 is preferred nowadays, rather than ISO8859-1 or

Dr Matthew J Seaman MA, D.Phil.

Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with Mozilla -



Want to link to this message? Use this URL: <>