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. |
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. |
/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.
|
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. |
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. |
Quote:
To know more: Code:
man XCompose |
All times are GMT -5. The time now is 08:14 AM. |