Re: Locales documentation - custom locale

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, 

Thanks for your answer! As we speak, I have solved my problem (see
below). That aside, I think that there is a serious issue with Gnome's
handling of locales:

On Mon, 2018-11-12 at 19:45 +0100, Rafal Luzynski wrote:
> 9.11.2018 14:39 Dominik Grafenhofer <d.fedora@xxxxxxxxxxxxxx> wrote:
> > Hi all,
> > 
> > I would like to create a new custom locale (basically irish english
> > +
> > monday as first day of the week).
> 
> Off-topic: does not en_GB.utf8 provide this functionality?

No, I would like to have Euro as my default currency.

> Is there a bug in the existing en_IE locale which needs a fix?

I am a German speaking user, living in Germany. Still, I would like to
use English (UK) language settings (UI, Email templates,...), but
retain some other conventions used in Germany (Monday as first day of
week, Euro as currency). en_IE is the closest I could get using default
locales.

> > Where can I find recent information
> > on how locales are implemented in Fedora (I am on Fedora 29)? I
> > found
> > lots of outdated information, which was somewhat helpful, but also
> > quite confusing.
> 
> Locales are implemented in glibc rather than Fedora. I don't remember
> where I saw it written but the message was that since all existing
> documentation is currently outdated the recommended way is to take a
> source
> code of any existing locale [1] and rework it for your own needs.
> 
> The tool to build your own locale data is called localedef. You can
> find some documentation at the command line:
> 
>     localedef --help
>     man localedef
>     info localedef

The missing piece in the documentation is, that you have to install the
"glibc-locale-source" package to make localedef compile locales (see
below). The error message localedef yields was not clear enough for me
to realize, that there is a package missing. In a desperate move, I
consulted dnf to tell me packages containing the substring locale.
glibc-locale-source sounded somewhat appropriate. 

> 
> The purpose of this tool is to allow the users to build and use their
> own
> locales. You don't need the root privileges to use it. Therefore your
> idea
> seems to be correct.
> 
> That said, I'm trying to find a simpler solution to your problem.

... which is - as far as I know (see info spread across this mail) -
not feasible. 

> 
> > Thank you,
> > Dominik
> > 
> > Background: Gnome-shell does not allow to customize locale settings
> > beyond choosing one locale setting globally (ui language, currency,
> > first day of week,...).
> 
> I'm not sure but as far as I understand this, GNOME allows you to
> select
> a locale for language (messages) and formats (I guess this is
> everything
> else). Is it sufficient for you?

Unfortunately no. I would like to mix and match different formats (see
above).

> If not you may have to set the localization environment variables
> (LC_MESSAGES, LC_TIME, LC_MEASUREMENT etc.) individually in your
> profile
> scripts.

Yes, that would be great - if Gnome Shell would adhere to that
wish/configuration setting. It applies the LANG setting (if i am not
mistaken) to all other areas (LC_TIME, LC_MEASUREMENT, etc.) as well.

> If really none of these options works then you will have to build
> your
> own locale. Again, in order to use it you will have to set the
> environment
> variables (e.g., path to your new locale) in your profile scripts.

Yes, this is how it worked:

1) I downloaded an appropriate locale close enough to what I was
looking for (i.e. en_IE in my case). [*]
2) I have made adjustments to the file.
3) I installed glibc-locale-source (this was the step which I found out
about only now, and which kept me from arriving at the solution
earlier).
4) Run "localedef -f UTF-8 -i en_DE en_DE.UTF-8" to compile the locale.
4) Add "LANG=en_DE.UTF-8" to /etc/locale.conf (or better to a local
profile)
5) Reboot

Yay! Works!

> Regards,
> 
> Rafal

Thank you for taking time to guide me in the right direction!

Best,
Dominik

[*] Better source: After installing glibc-locale-source
/usr/share/i18n/locales/ is populated with locale source files.

> 
> [1] 
> https://sourceware.org/git/?p=glibc.git;a=tree;f=localedata/locales
> 
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux