LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 09-12-2013, 08:56 AM   #1
narke
Member
 
Registered: Apr 2010
Posts: 70

Rep: Reputation: 0
Where there are three different locale directories


Hi,

Where there exists three different directories holding locale data? They are /usr/lib/locale, /usr/share/locale and /usr/share/X11/locale in my system. What is for what?

Thanks in advance.

Sorry for a typo: where -> why.

Last edited by narke; 09-12-2013 at 09:21 AM. Reason: fix typo
 
Old 09-12-2013, 10:19 AM   #2
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 3,990

Rep: Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001
I would say partially historical reason. Also X11 uses its own settings, that is the last one (the others mainly for console). But probably their usage are mixed a bit, because the original goal of them is lost...
But I'm unsure, maybe there is a much more precise answer.
 
Old 09-12-2013, 12:36 PM   #3
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,724

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
/usr/lib/locale is where glibc puts the system locales. /usr/share/locale is where programs put them -except for X stuff as noted above.
 
Old 09-12-2013, 02:31 PM   #4
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware-14.0 on a Lenovo T61 6457-4XG
Posts: 3,636

Rep: Reputation: 827Reputation: 827Reputation: 827Reputation: 827Reputation: 827Reputation: 827Reputation: 827
In Linux, locale definitions (provided by glibc and glibc-i18n packages in Slackware), are customarily stored in /usr/lib/locale.

In /usr/share/locale you will find mostly <locale>/LC_MESSAGES subdirectories, that host files ending in .mo. These files are translations of application messages in the given locale, in the Machine Object (MO) format defined by gettext here. /usr/share/locale is the default location for these files.

See also Internationalization variables in the POSIX specification and Locale Environment Variables in gettext's manual.

Long story short: to translate messages of an application in a given language you need a proper MO file in /usr/share/locale/<locale>/LC_MESSAGES *and* locale definitions in /usr/lib/locale.

Last edited by Didier Spaier; 09-12-2013 at 02:59 PM.
 
2 members found this post helpful.
Old 09-14-2013, 10:38 AM   #5
narke
Member
 
Registered: Apr 2010
Posts: 70

Original Poster
Rep: Reputation: 0
Didier,

thanks. you well explained that /usr/lib/locale is for locale definition and /usr/share/locale is for locale data (MOs, etc). I think I understood the point. But you don't talk about /usr/share/X11/locale, where the files looks quite different.
 
Old 09-14-2013, 12:13 PM   #6
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware-14.0 on a Lenovo T61 6457-4XG
Posts: 3,636

Rep: Reputation: 827Reputation: 827Reputation: 827Reputation: 827Reputation: 827Reputation: 827Reputation: 827
Quote:
Originally Posted by narke View Post
But you don't talk about /usr/share/X11/locale, where the files looks quite different.
These files mainly register X client mappings for multi-key input sequences (using sequences of key strokes that are combined to enter a single character). The mappings depend on the locale used, hence the need of these files.

To know more:
Code:
man XCompose
 
1 members found this post helpful.
  


Reply

Tags
locale


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
locale: Cannot Set LC_ALL to default locale: No such file or directory. asym Linux - General 10 03-24-2013 08:35 PM
How to change the locale by setting the system default locale letdoit Slackware 6 08-18-2011 03:34 AM
after-Installation errors. locale error. unsupported locale settings and two more gh0st Fedora 1 05-02-2008 05:06 AM
locale: Cannot set LC_ALL to default locale: Invalid argument GadgetWiz Mandriva 1 03-31-2006 11:38 PM


All times are GMT -5. The time now is 11:47 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration