You are not logged in.

#1 2023-01-15 13:53:14

WELL1NGTON
Member
From: Brasil
Registered: 2023-01-15
Posts: 2

[SOLVED] LANGUAGE: fallback locales unexpected behavior

Hi, reading the arch wiki I found out that it's possible to set fallback languages as a locale configuration (https://wiki.archlinux.org/title/locale … ck_locales), so I tried to set it to "en_US:pt_BR:en:C" (I want most things in English, but fallback to Portuguese in the rare occasion where something doesn't have English available).

The problem is that the output of most programs like pacman uses Portuguese even if en_US is set first, I also tried "en_US:pt_BR", "pt_BR:en_US", "en:pt_BR", "en:pt" and "pt:en", but all of those options ends up in Portuguese output, I can only get English output with the LANGUAGE set to "en_US" only without any fallback.

I'm not sure if I misunderstood the wiki, but I wanted to set pt_BR only as a fallback option.

Here are some commands outputs that may help understand my setup:

locale

LANG=en_US.UTF-8
LC_CTYPE=pt_BR.UTF-8
LC_NUMERIC=pt_BR.UTF-8
LC_TIME=pt_BR.UTF-8
LC_COLLATE=pt_BR.UTF-8
LC_MONETARY=pt_BR.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_PAPER=pt_BR.UTF-8
LC_NAME=pt_BR.UTF-8
LC_ADDRESS=pt_BR.UTF-8
LC_TELEPHONE=pt_BR.UTF-8
LC_MEASUREMENT=pt_BR.UTF-8
LC_IDENTIFICATION=pt_BR.UTF-8
LC_ALL=

env | grep LANG

LANG=en_US.UTF-8
LANGUAGE=en_US:pt_BR:en:C

localectl

System Locale: LANG=en_US.UTF-8
    VC Keymap: (unset)
   X11 Layout: (unset)

locale -a

C
C.UTF-8
en_US.utf8
POSIX
pt_BR.utf8

LANGUAGE=en_US:pt_BR:en:C pacman -h

uso:  pacman <operação> [...]
operações:
    pacman {-h --help}
    pacman {-V --version}
    pacman {-D --database} <opções> <pacote(s)>
    pacman {-F --files}    [opções] [arquivo(s)]
    pacman {-Q --query}    [opções] [pacote(s)]
    pacman {-R --remove}   [opções] <pacote(s)>
    pacman {-S --sync}     [opções] [pacote(s)]
    pacman {-T --deptest}  [opções] [pacote(s)]
    pacman {-U --upgrade}  [opções] <arquivo(s)>

use "pacman {-h --help}" com uma operação para ver as opções disponíveis

LANGUAGE=en_US pacman -h

usage:  pacman <operation> [...]
operations:
    pacman {-h --help}
    pacman {-V --version}
    pacman {-D --database} <options> <package(s)>
    pacman {-F --files}    [options] [file(s)]
    pacman {-Q --query}    [options] [package(s)]
    pacman {-R --remove}   [options] <package(s)>
    pacman {-S --sync}     [options] [package(s)]
    pacman {-T --deptest}  [options] [package(s)]
    pacman {-U --upgrade}  [options] <file(s)>

use 'pacman {-h --help}' with an operation for available options

Last edited by WELL1NGTON (2023-01-15 16:01:37)

Offline

#2 2023-01-15 15:22:14

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 714

Re: [SOLVED] LANGUAGE: fallback locales unexpected behavior

The note in https://wiki.archlinux.org/title/Locale … ck_locales addresses your issue.

Offline

#3 2023-01-15 16:00:34

WELL1NGTON
Member
From: Brasil
Registered: 2023-01-15
Posts: 2

Re: [SOLVED] LANGUAGE: fallback locales unexpected behavior

nl6720 wrote:

You are right, I completely missed that. Thank you.

Offline

Board footer

Powered by FluxBB