help-bash
[Top][All Lists]
Advanced

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

Re: How to use $"msgid"?


From: Jesse Hathaway
Subject: Re: How to use $"msgid"?
Date: Wed, 24 Mar 2021 09:01:45 -0500

On Wed, Mar 24, 2021 at 8:48 AM Peng Yu <pengyu.ut@gmail.com> wrote:
> > $ cd ~
> Just to make sure. It doesn't seem to go to home in this case? Am I correct?

You are correct, you could start these steps in any directory, in this example
I used your home directory, but any directory should work.

> > # This is necessary to get the base files needed for the es_ES locale
> > $ apt-get install locales-all
>
> I see these files. How are they used for `LANG=es_ES.UTF-8`? It seems
> that all info is in ~+/locale/es_ES/LC_MESSAGES/hello.mo. I don't
> under how files in locales-all are used?
>
> $ apt-file list locales-all |grep 'es_ES[.]utf8'
> locales-all: /usr/lib/locale/es_ES.utf8/LC_ADDRESS
> locales-all: /usr/lib/locale/es_ES.utf8/LC_COLLATE
> locales-all: /usr/lib/locale/es_ES.utf8/LC_CTYPE
> locales-all: /usr/lib/locale/es_ES.utf8/LC_IDENTIFICATION
> locales-all: /usr/lib/locale/es_ES.utf8/LC_MEASUREMENT
> locales-all: /usr/lib/locale/es_ES.utf8/LC_MESSAGES/SYS_LC_MESSAGES
> locales-all: /usr/lib/locale/es_ES.utf8/LC_MONETARY
> locales-all: /usr/lib/locale/es_ES.utf8/LC_NAME
> locales-all: /usr/lib/locale/es_ES.utf8/LC_NUMERIC
> locales-all: /usr/lib/locale/es_ES.utf8/LC_PAPER
> locales-all: /usr/lib/locale/es_ES.utf8/LC_TELEPHONE
> locales-all: /usr/lib/locale/es_ES.utf8/LC_TIME

This is a good question, I am not sure why they are necessary, but before
I installed locales-all, when I tried to switch my locale with LANG=es_ES.UTF-8
and then used the locale command, the locale command would spit out these
errors and the bash would not translate the strings:

$ LANG=es_ES.UTF-8
$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory



reply via email to

[Prev in Thread] Current Thread [Next in Thread]