Welcome at Solaris New Locales project.
Adding a new Locale to Solaris - Quick guide for community
Please feel free to update or modify this document. If you find something wrong or incomplete please add the information or send me an email (the first option is preferred
)
The document describes how to help with a new locale in Solaris. In the document I use pseudo code xx_YY.UTF-8 for the new locale - substitute your language (ISO 639-1) and country (ISO 3166) codes.
- OpenSolaris Project: Nevada Globalization workspace
- read project description at http://www.opensolaris.org/os/project/nv-g11n/
- section 'Source Code' contains information about public workspaces and how to access the source codes.
- join your language group (section 'How to Contribute')
- build workspace ssh://hg.opensolaris.org/hg/nv-g11n/g11n#** clone the workspace
$ hg clone ssh://anon@hg.opensolaris.org/hg/nv-g11n/g11n- check structure of the workspace. Locale definition files are in directory ../g11n/src/locale_src/
- build the code http://www.opensolaris.org/os/project/nv-g11n/documents/building/
- read project description at http://www.opensolaris.org/os/project/nv-g11n/
- Check the status of data for a new locale in CLDR
- read the CLDR project description at http://www.unicode.org/cldr/
- locale data can be viewed on-line in Survey Tool http://www.unicode.org/cldr/survey_tool.html
- if you find that the data need to be fixed, submit a CLDR bug or contact cldr-interest@sun.com
- the following categories are important for Solaris:
Other Items: all
Calendars: Gregorian
- Are you still sure you want to add new locale to Solaris? Yes? Great! Please send mail to i18n-discuss@opensolaris.org that you working on the locale - installer/xkbd/input packages also need to be updated to complete the integration of the locale package
- Check that there is package for the new locale
- locales are packed according to the language - all UTF-8 locales of one language are in one package.
- prototype of the package is in ../g11n/pkgmaps/prototype.lang-xx where '-xx' is the language code.
- if the package does not exist, create it.
- we are in the process of opening this process up, meantime please contact Jan.Lana@Sun.COM for help with this.
- update SUNWlang-xx
- if you do not have write access to g11n workspace, you can send a patch to g11n-opensolaris_ws-eng@sun.com
(Mercurial Queues is great tool for this, see http://hgbook.red-bean.com/hgbookch12.html) - add to ../g11n/pkgmaps/prototype.lang-xx
d none usr 0755 root sys d none usr/lib 0755 root bin d none usr/lib/locale 0755 root bin d none usr/lib/locale/xx_YY.UTF-8 0755 root bin d none usr/lib/locale/xx_YY.UTF-8/LC_COLLATE 0755 root bin d none usr/lib/locale/xx_YY.UTF-8/LC_CTYPE 0755 root bin s none usr/lib/locale/xx_YY.UTF-8/LC_CTYPE/LCL_DEF=../../common/LC_CTYPE/LCL_DEF_unicode s none usr/lib/locale/xx_YY.UTF-8/LC_CTYPE/ldterm.dat=../../common/LC_CTYPE/ldterm_unicode.dat s none usr/lib/locale/xx_YY.UTF-8/LC_CTYPE/wdresolve.so=../../common/LC_CTYPE/wdresolve_unicode.so d none usr/lib/locale/xx_YY.UTF-8/LC_MESSAGES 0755 root bin d none usr/lib/locale/xx_YY.UTF-8/LC_MONETARY 0755 root bin d none usr/lib/locale/xx_YY.UTF-8/LC_NUMERIC 0755 root bin d none usr/lib/locale/xx_YY.UTF-8/LC_TIME 0755 root bin f none usr/lib/locale/xx_YY.UTF-8/locale_description 0644 root bin f none usr/lib/locale/xx_YY.UTF-8/locale_map 0644 root bin d none usr/lib/locale/xx_YY.UTF-8/LO_LTYPE 0755 root bin s none usr/lib/locale/xx_YY.UTF-8/LO_LTYPE/xx_YY.UTF-8.layout.so.1=../../common/LO_LTYPE/umle.layout.so.1 s none usr/lib/locale/xx_YY.UTF-8/methods_unicode.so.3=../common/methods_unicode.so.3 f none usr/lib/locale/xx_YY.UTF-8/xx_YY.UTF-8.so.3 0555 root bin
- add to ../g11n/pkgmaps/prototype.lang-xx.i386
d none usr 0755 root sys d none usr/lib 0755 root bin d none usr/lib/locale 0755 root bin d none usr/lib/locale/xx_YY.UTF-8/amd64 0755 root bin s none usr/lib/locale/xx_YY.UTF-8/amd64/methods_unicode.so.3=../../common/amd64/methods_unicode.so.3 f none usr/lib/locale/xx_YY.UTF-8/amd64/xx_YY.UTF-8.so.3 0555 root bin
- add to ../g11n/pkgmaps/prototype.lang-xx.isparc
d none usr 0755 root sys d none usr/lib 0755 root bin d none usr/lib/locale 0755 root bin d none usr/lib/locale/xx_YY.UTF-8/sparcv9 0755 root bin s none usr/lib/locale/xx_YY.UTF-8/amd64/methods_unicode.so.3=../../common/sparcv9/methods_unicode.so.3 f none usr/lib/locale/xx_YY.UTF-8/sparcv9/xx_YY.UTF-8.so.3 0555 root bin
- create dir ../g11n/src/lib/locale/xx_YY.UTF-8 and in the dir
- create file Makefile, model it on Makefile of another locale
- create file locale_description, refer to ISO 3166, example:
Ukraine (UTF-8)
- create file locale_map
LC_COLLATE=xx_YY.UTF-8 LC_CTYPE=xx_YY.UTF-8 LC_MESSAGES=C LC_MONETARY=xx_YY.UTF-8 LC_NUMERIC=xx_YY.UTF-8 LC_TIME=xx_YY.UTF-8
- modify ../g11n/src/lib/locale/Makefileadd new locale to LOCALES
- create ../g11n/src/locale_src/base/xx_YY.UTF-8.localedefFIXME: write guide
- modify ../g11n/src/locale_src/base/Makefileadd new locale to LOCALES_UTF8
- if you do not have write access to g11n workspace, you can send a patch to g11n-opensolaris_ws-eng@sun.com
Following table lists locales which we are planning to add to Solaris system:
| Territory | Locale | Bug IDs | Target Build |
|---|---|---|---|
| Ukraine | uk_UA.UTF-8 | 6658916, 6658917 | nv_97 |
| Kazakh | kk_KZ.UTF-8 | 6695356, 6695363 | nv_97 |
| Belarus | be_BY.UTF-8 | nv_107 | |
| US | es_US.UTF-8 | nv_107 | |
| Georgia | ka_GE.UTF-8 | nv_107 | |
| South Africa |
af_ZA.UTF-8 | 6866911 |
nv_123 |
| Italian (Swiss) |
it_CH.UTF-8 | 6866911 |
nv_123 |
| Kyrgyzstan |
ky_KG.UTF-8 |
6866911 |
nv_123 |
| Azerbaijan |
az_AZ.UTF-8 | 6866911 |
nv_123 |
Comments (1)
Nov 12, 2008
willem.schaik says:
Do you know of any plans to add an "en_DK" locale. The combination of English an...Do you know of any plans to add an "en_DK" locale. The combination of English and Denmark is of course kind of a joke, but it exists in Linux distros and it is used for an ISO 8601 compliant date format ("yyyy-mm-dd"). Which is very useful for programs like Thunderbird.
Surprisingly, none of the many Solaris 10 locales (at least on my SXDE 2008/01) has this date format. The locate that comes closest is "fr_CA" which uses "yy-mm-dd".
Willem