Results 1 to 7 of 7

Thread: Change 'apt' and 'apt-get' language

  1. #1
    Join Date
    Aug 2021
    Beans
    4

    Change 'apt' and 'apt-get' language

    Hello. I installed Kubuntu 21.04, specified timezone for Russia, and also added russian keyboard layout. But i didnt want any russian locales in my system.
    My apt and apt-get commands output info in russian language and i need everything in en_US.
    My
    Code:
    locale
    output is:
    Code:
    LANG=en_US.UTF-8 
    LANGUAGE=en_US:en_US:ru 
    LC_CTYPE="en_US.UTF-8" 
    LC_NUMERIC=en_US.UTF-8 
    LC_TIME=en_US.UTF-8 
    LC_COLLATE=en_US.UTF-8 
    LC_MONETARY=en_US.UTF-8 
    LC_MESSAGES="en_US.UTF-8" 
    LC_PAPER=en_US.UTF-8 
    LC_NAME=en_US.UTF-8 
    LC_ADDRESS=en_US.UTF-8 
    LC_TELEPHONE=en_US.UTF-8 
    LC_MEASUREMENT=en_US.UTF-8 
    LC_IDENTIFICATION=en_US.UTF-8 
    LC_ALL=
    
    So I think i need to get rid of LANGUAGE=en_US:en_US:ru

    Here https://wiki.archlinux.org/title/loc...llback_locales said that it can be declared in locale.conf.
    I created it
    Code:
    touch /etc/locale.conf
    and put there:
    Code:
    LANGUAGE=en_US:en_US:en
    
    Rebooted system and nothing changed:
    LANGUAGE=en_US:en_US:ru

    My /etc/default/locale :
    # File generated by update-locale
    Code:
    LANG=en_US.UTF-8 
    LC_NUMERIC="en_US.UTF-8" 
    LC_TIME="en_US.UTF-8" 
    LC_MONETARY="en_US.UTF-8" 
    LC_PAPER="en_US.UTF-8" 
    LC_NAME="en_US.UTF-8" 
    LC_ADDRESS="en_US.UTF-8" 
    LC_TELEPHONE="en_US.UTF-8" 
    LC_MEASUREMENT="en_US.UTF-8" 
    LC_IDENTIFICATION="en_US.UTF-8" 
    LANGUAGE=en_US:en_US
    I did
    Code:
    
    sudo update-locale LANG=LANG=en_US.UTF-8 LANGUAGE
     sudo dpkg-reconfigure locales
    
    None of these helps. Help me please.



  2. #2
    Join Date
    Jun 2019
    Location
    Dirndl-land
    Beans
    923
    Distro
    Lubuntu 20.04 Focal Fossa

    Re: Change 'apt' and 'apt-get' language

    Keyboard layout and local/labguage are two different things.
    You've fixed the keyboard, great!

    Let me show you my output from locale:
    Code:
    LANG=en_DK.UTF-8
    LANGUAGE=
    LC_CTYPE="en_DK.UTF-8"
    LC_NUMERIC=de_DE.UTF-8
    LC_TIME=en_DK.UTF-8
    LC_COLLATE="en_DK.UTF-8"
    LC_MONETARY=de_DE.UTF-8
    LC_MESSAGES="en_DK.UTF-8"
    LC_PAPER=de_DE.UTF-8
    LC_NAME=de_DE.UTF-8
    LC_ADDRESS=de_DE.UTF-8
    LC_TELEPHONE=de_DE.UTF-8
    LC_MEASUREMENT=de_DE.UTF-8
    LC_IDENTIFICATION=de_DE.UTF-8
    LC_ALL=
    As you see, the "LANGUAGE" field is empty, which is no problem and it works fine. Question is where that field is loaded from...

  3. #3
    Join Date
    Jun 2019
    Location
    Dirndl-land
    Beans
    923
    Distro
    Lubuntu 20.04 Focal Fossa

    Re: Change 'apt' and 'apt-get' language

    Try with:
    Code:
    sudo update-locale LANG=LANG=en_US.UTF-8 LANGUAGE
    That should clear the LANGUAGE definitions.

  4. #4
    Join Date
    Aug 2021
    Beans
    4

    Re: Change 'apt' and 'apt-get' language

    Quote Originally Posted by ml9104 View Post
    Try with:
    Code:
    sudo update-locale LANG=LANG=en_US.UTF-8 LANGUAGE
    That should clear the LANGUAGE definitions.
    Thank you for answer. The output of command is:
    Code:
    snorlax212@snorlax212pc:~$ sudo update-locale LANG=LANG=en_US.UTF-8 LANGUAGE 
    *** update-locale: Error: invalid locale settings:  LC_NUMERIC="en_US.UTF-8" 
    LC_TIME="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LANG=L
    ANG=en_US.UTF-8 LC_MEASUREMENT="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS
    ="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" 
    snorlax212@snorlax212pc:~$ 
    
    
    LANGUAGE var is still the same.

  5. #5
    Join Date
    Aug 2021
    Beans
    4

    Re: Change 'apt' and 'apt-get' language

    Ok, looks like I fixed my problem. In 'System Settings -> Regional Settings -> Language' there is option 'Configure Plasma translations', although 'Amerian English (Default)' present, there was 'Russian' too.. Removed it, rebooted and voila! locale output: LANGUAGE=en_US:en_US:en_US

    But Im interested, why your command says Error: invalid locale settings
    What is exactly invalid?

  6. #6
    Join Date
    Jun 2019
    Location
    Dirndl-land
    Beans
    923
    Distro
    Lubuntu 20.04 Focal Fossa

    Re: Change 'apt' and 'apt-get' language

    Sorry, my mistake (cut 'n paste edit error) The command should have been:
    Code:
    sudo update-locale LANG=en_US.UTF-8 LANGUAGE
    Invalid? = not valid = wrong.

  7. #7
    Join Date
    Aug 2021
    Beans
    4

    Re: Change 'apt' and 'apt-get' language

    Quote Originally Posted by ml9104 View Post
    Sorry, my mistake (cut 'n paste edit error) The command should have been:
    Code:
    sudo update-locale LANG=en_US.UTF-8 LANGUAGE
    Invalid? = not valid = wrong.
    No errors now, LANGUAGE=en_US:en_US:en_US
    Whatever, apt now in English as i wanted. Thank you for help.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •