Welcome to Machine Unix

Search Below

Locales on SmartDataCenter

In one of my earlier posts, I briefly touched installing a locale on a solaris zone. It was and still is an easy procedure. On the GZ of SDC, most of the locales are installed already. If you have a SmartMachine provisioned in your environment, you can probably see what is out there:

[root@lems ~]# locale -a
C
POSIX
af_ZA.UTF-8
ar_AE.UTF-8
ar_BH.UTF-8

….

zh_MO.UTF-8
zh_SG.UTF-8
zh_TW.UTF-8

To see what is currenly installed in your SmartMachine, you can do the following:

[root@lems ~]# locale
LANG=en_US.UTF-8
LC_CTYPE=”en_US.UTF-8″
LC_NUMERIC=”en_US.UTF-8″
LC_TIME=”en_US.UTF-8″
LC_COLLATE=”en_US.UTF-8″
LC_MONETARY=”en_US.UTF-8″
LC_MESSAGES=”en_US.UTF-8″
LC_ALL=

So what if you wanted to change your default locale? Since it is already installed, the easiest method could be adding aline to your /etc/profile for the LANG variable:

….

export LANG=es_AR.UTF-8

Just after doing this, log out and log back into your shell, and check what just happened:

[root@lem~]# echo $LANG
es_AR.UTF-8
[root@lems ~]# locale
LANG=es_AR.UTF-8
LC_CTYPE=”es_AR.UTF-8″
LC_NUMERIC=”es_AR.UTF-8″
LC_TIME=”es_AR.UTF-8″
LC_COLLATE=”es_AR.UTF-8″
LC_MONETARY=”es_AR.UTF-8″
LC_MESSAGES=”es_AR.UTF-8″
LC_ALL=

It is that easy, enjoy!

Leave a Reply

Your email address will not be published. Required fields are marked *

You can use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>