Wednesday, August 27, 2008

Shortcut method for testing new locale file with glibc in Fedora

I had some discussion on Indlinux list about testing newly locale file/collation with glibc but that time i didn't no the short cut method, i was building glibc with changes and then testing it, it was taking long time. :(
Had a discussion with Ulrich Drepper on this and he suggested good tips on testing locale/collation in 10 minutes, so sharing with all :)

step 1:
- make a new folder

step 2:
- copy the locale file there
ex: cp mr_IN to NEW_FOLDER/mr (note i have changed name of locale file)

step 3:
- edit mr (do changes you want example you can add collation info etc)

step 4:
- run following command
$localedef -i ./mr -f UTF-8 ./mr_IN
that's it.
It will create new folder mr_IN with all locale information

step 5:
- for testing with these new changes locally, use following command
*make sure you are in new folder created in first step
LOCPATH=$PWD LC_ALL=mr_IN date

step 6:
for adding this into archive permanently use following command
need to be root
root$ localedef --add-to-archive mr_IN

No comments: