How to change languageto swedish/latin on CentOS?

Discussion in 'Installation/Configuration' started by oskare100, Oct 16, 2007.

  1. oskare100

    oskare100 New Member

    Hello,
    I've worked a lot to get my server working but now I discovered that I choose wrong language support when I installed CentOS 5. It works in HTTPD to set the default charset to UFT-8 but when I try to use PHP functions as ucwords() and when I try to phrase XML it doesn't work as it should so I need to set the locale? or language? to the default one for Swedish so I can use the Swedish å,ä and ö letters.

    I've tried with:
    localedef -i sv_SE -f ISO-8859-1 sv_SE
    export LC_ALL=sv_SE
    export LANG=sv
    and similar but it doesn't work.

    So please, I'm greatful for anything that could help me solve this.

    Thanks,
    Oskar
     
  2. oskare100

    oskare100 New Member

    Hello again,
    Here is what happens when I try to change in the way I mentioned in my first post:
    [[email protected] ~]# localedef -i sv_SE -f ISO-8859-1 sv_SE.UTF-8
    [[email protected] ~]# export LC_ALL=sv_SE.UTF-8
    [[email protected] ~]# export LANG=sv_SE.UTF-8
    [[email protected] ~]# locale
    LANG=sv_SE.UTF-8
    LC_CTYPE="sv_SE.UTF-8"
    LC_NUMERIC="sv_SE.UTF-8"
    LC_TIME="sv_SE.UTF-8"
    LC_COLLATE="sv_SE.UTF-8"
    LC_MONETARY="sv_SE.UTF-8"
    LC_MESSAGES="sv_SE.UTF-8"
    LC_PAPER="sv_SE.UTF-8"
    LC_NAME="sv_SE.UTF-8"
    LC_ADDRESS="sv_SE.UTF-8"
    LC_TELEPHONE="sv_SE.UTF-8"
    LC_MEASUREMENT="sv_SE.UTF-8"
    LC_IDENTIFICATION="sv_SE.UTF-8"
    LC_ALL=sv_SE.UTF-8
    [[email protected] ~]# shutdown -r now

    Broadcast message from root (pts/0) (Tue Oct 16 13:15:29 2007):

    The system is going down for reboot NOW!
    login as: root
    [email protected]'s password:
    Last login: Tue Oct 16 13:11:38 2007 from xxx.xxx.xxx.xx
    [[email protected] ~]# 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_PAPER="en_US.UTF-8"
    LC_NAME="en_US.UTF-8"
    LC_ADDRESS="en_US.UTF-8"
    LC_TELEPHONE="en_US.UTF-8"
    LC_MEASUREMENT="en_US.UTF-8"
    LC_IDENTIFICATION="en_US.UTF-8"
    LC_ALL=
    [[email protected] ~]#

    In other words, after restart it gets back to what it was before and before restart it doesn't have any affect on the system...

    /Oskar
     
    Last edited: Oct 16, 2007
  3. ebal

    ebal New Member

    an easy way is to write at the bottom of /etc/bashrc

    the exports

    for example:

    # export -p LC_ALL=el_GR.utf8
    # export -p LANG=el_GR.utf8
     

Share This Page