add a new language to Oracle

I first thought of adding Klingon. Well, finally I added Romansh, which is the fourth official language in my country.

Ok, here we go :

$ $ORACLE_HOME/nls/lbuilder/lbuilder &

The Oracle Locale Builder tool is started.

File –> New… –> Language

You specify the language, the spelling for January, for Monday, etc… Most fields are mandatory. If you do not know about one field, like EBCDIC, just find one in the “Show existing definition…” Dialog

File –> Save as…

You save your nlt file

File –> Tools –> Generate NLB

Three NLB files are generated.
$ ls -l *.nl*
-rw-r--r-- 1 lsc users 934 2008-02-19 18:17 lx003eb.nlb
-rw-r--r-- 1 lsc users 3843 2008-02-19 18:17 lx003eb.nlt
-rw-r--r-- 1 lsc users 128 2008-02-19 18:17 lx0boot.nlb
-rw-r--r-- 1 lsc users 428 2008-02-19 18:17 lx0boot.nlt
-rw-r--r-- 1 lsc users 22528 2008-02-19 18:17 lx1boot.nlb

Copy all your the NLB files to your ORACLE_HOME/data/nls.

Restart your instance.

Let’s test it 😉


select
to_char(
sysdate,
'fmday dd month yyyy','NLS_DATE_LANGUAGE=romansch'
)
from dual;
TO_CHAR(SYSDATE,'FMDAYDDMONTHYY
-------------------------------
mardis 19 favrer 2008

5 thoughts on “add a new language to Oracle

Comments are closed.