Wednesday, November 13, 2024
HomeApplemacos - Can not change terminal language regardless of doing every part...

macos – Can not change terminal language regardless of doing every part seemingly accurately, GUI is translated


Taking place on macOS: 14.4.1

I am unable to change by the GUI as that is required to be carried out for a number of languages and must be automated, the completely different locales might be in a script.

All the things I attempted up to now – GUI translated, Terminal shouldn’t be

Listed below are the instructions I ran to vary the GUI to French (solely first 2 are wanted).
These are overkill as I used to be making an attempt to get the terminal to translate:

sudo defaults write /Library/Preferences/.GlobalPreferences AppleLanguages -array fr-FR
sudo defaults write /Library/Preferences/.GlobalPreferences AppleLocale -string fr_FR
sudo defaults write /Library/Preferences/.GlobalPreferences Nation -string FR


sudo defaults write ~/Library/Preferences/.GlobalPreferences AppleLanguages -array fr-FR
sudo defaults write ~/Library/Preferences/.GlobalPreferences AppleLocale -string fr_FR
sudo defaults write ~/Library/Preferences/.GlobalPreferences Nation -string FR

Then I rebooted the machine, on checking the locale I get en_GB:

defaults learn -g AppleLocale
en_GB 

Nonetheless the file the command above supposedly reads exhibits fr_FR:

defaults learn /Library/Preferences/.GlobalPreferences AppleLocale AppleLocales
fr_FR

Language can be proven as fr-FR:

defaults learn /Library/Preferences/.GlobalPreferences AppleLocale AppleLanguages
{
    "fr-FR"
}

The outputs are the identical for .GlobalPreferences in ~/Library.

I then tried to export these vars to ~/.zshrc which solved the issue for others:

cat ~/.zshrc

# tried this earlier than to no avail, different solutions stated to make use of the uncommented LANG variable
# export LANG='fr_FR' 
export LANG='fr_FR.UTF-8'
export LC_ALL='fr_FR.UTF-8'

locale

locale
LANG="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_CTYPE="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_ALL="fr_FR.UTF-8"

Instance to point out terminal continues to be in English (the error textual content must be translated):

ls fged

ls: fged: No such file or listing

System Preferences exhibits français.
I had no issues doing this on linux, any concepts?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments