Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
Hi! If I type on my GNU/Linux "locale -a" it says that I only have installed POSIX and C locales. How can I add some new? Where do I get ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2009
    Posts
    7

    Problem with locale


    Hi!

    If I type on my GNU/Linux "locale -a" it says that I only have installed POSIX and C locales.

    How can I add some new? Where do I get them?

    I want to do this on the terminal without any YAST or so....

    Tanks!
    Michael

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,558
    What distribution+version of Linux are you running?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Jun 2009
    Posts
    7

    Linux Version

    Kernel: 2.6.24
    "Distribution": ELDK 4.2 (denx.de/wiki/DULG/ELDK)
    Target: MPC52xx

    It's not a distribution like, fedora or so...

    Regards!

  4. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,558
    Ok. You need to get the locale database and install it with the localedef command. I am attaching the locale definition files that you can use which I have on my RHEL/CentOS system since I couldn't find them in a usable format elsewhere on the internet after google searching. Unfortunately, the charmap files are too big as a group to upload, but I am including some more common ones, such as utf-8, etc. Let me know if you need any other charmaps and I can email them to you. You can find where your system expects these files to be found with the command: localedef --help
    On my system, the charmap and locales definition files are under /usr/share/i18n. Anyway, I hope you can use these.
    Attached Files Attached Files
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  5. #5
    Just Joined!
    Join Date
    Jun 2009
    Posts
    7
    OK, I'll try it as soon I have access to my system on monday!

    Thanks for your support!

    BTW: Is ISO-8859 (or 8895?) also included there?

  6. #6
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,558
    Yes. All the 8859 files are there.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  7. #7
    Just Joined!
    Join Date
    Jun 2009
    Posts
    7
    Hmmm.... I don't understand how it works...

    If I type: "locale -a" I get (just the important things posted):
    > C
    > POSIX

    If I type "localedef --help" I get (also just the important things posted":
    > /usr/share/i18n/charmaps
    > /usr/share/i18n/repertoiremaps
    > /usr/lib/locale:/usr/share/i18n

    So, now I want to make it possible that I can configure de_CH.ISO-8859-1 as my locale I tried it with: "localedef -f ISO-8859-1 -i de_CH de_CH.ISO-8859-1", then it says:
    cannot create temporary file: No such file or directory

    If I try: "localedef -f ISO-8859-1 -i de_CH ./" (local path) then it generates all the LC_*-files in my current directory... But what have I to do with them now???

    I don't find any suitable info googling....

    Thanks!

  8. #8
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,558
    Run
    Code:
    localedef --help
    That will show you where stuff is located (or should be). Also, if you read the man pages I think it shows where the default locale files (compiled ones) or database should be located. Also, you need to build the locales as root.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  9. #9
    Just Joined!
    Join Date
    Jun 2009
    Posts
    7
    Thanks!

    But my problem is a bit deeper... I don't understand the "philosophie" of this locale-thing....

    I compiled it into the folder which was suggested by localedef (Then it builded all the LC_TYPE, LC_NAME, etc. stuff. And also a folder LC_MESSAGES which contains SYS_LC_MESSAGES)... But how do I "activate" the locale now? There's a bit confusion...

  10. #10
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,558
    Locales are used to determine what symbols to use for monetary values, and how to format them, as well as other numbers (where to put the commas and what to use for decimals), what are standard paper sizes for printing, how to collate string data, etc. You set your local locale (sic) by setting the LANG environment variable.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •