Would you like to react to this message? Create an account in a few clicks or log in to continue.

Locale not working? Try this terminal alternative

Go down

Can you change language of ChaletOS following these instructions?

Locale not working? Try this terminal alternative Vote_lcap0%Locale not working? Try this terminal alternative Vote_rcap 0% 
[ 0 ]
Locale not working? Try this terminal alternative Vote_lcap0%Locale not working? Try this terminal alternative Vote_rcap 0% 
[ 0 ]
 
Total Votes : 0
 
 

Locale not working? Try this terminal alternative Empty Locale not working? Try this terminal alternative

Post by jasuzuki Thu Aug 22, 2019 3:25 am

Hello.
I'm helping a work colleague to install ChaletOS and it's showing the error that language is not supported and giving an error window.
How he can't read English, I tried to go to Settings/Language and uninstall English and install the language I want (in this case, Brazilian Portuguese). However, it doesn't work.
I change the Region settings, change the currency and date (BRZ -R$ and dd/MM/yyyy for Brazil), and it was accepted, but the language was still in English.

Searching for the Xubuntu tutorials and questions, I have read the orientation about how to change locale in terminal at this link (https://askubuntu.com/questions/133318/how-do-i-change-the-language-via-a-terminal).

What you will need:

Open the terminal emulator.
Click on start and show all items, scroll down and click the Terminal Emulator

You can check whether your desired language is installed or not with the command
Code:
sudo locale -a

So I tried to change two files:
Global default locale file at /etc/default/locale
Code:
LANG="pt_BR.UTF-8"
LANGUAGE="pt_BR.UTF-8"
and ~/.pam_environment
Code:
LANG="pt_BR.UTF-8"
LANGUAGE="pt_BR.UTF-8"


If you want to change a specific user, you need to add these lines also in the file ~/.pam_environment

Restart to check if your language has changed. It wasn't my case...  Sad

So I decided to read the manual of locale (finally!!!)... I read from https://help.ubuntu.com/community/Locale

I tried two things at once, I don't know which one has worked...

1) Terminal command to update the language at once:

Code:
sudo update-locale LANG=pt_BR.UTF-8 LC_ALL=pt_BR.UTF-8 LC_MESSAGES=POSIX
(* read below to POSIX definition)

2) Recompile locale

I tried to recompile locale as it is, but if you have knowledge, you can change the definitions at
/usr/share/i18n/locales/ru_RU
To recompile, use the command
Code:
sudo locale-gen

Restarted and voilà!
I tried to open Firefox and it was translated to the desired language.
Not all items in desktop were translated, but it worked.

I hope it can help who is willing to change language.

Regards,
Johnny


(*)POSIX Locale
The POSIX locale is equal to the C locale. To avoid being classified as a C-language function, the name has been changed to the POSIX locale; the environment variable value can be either "POSIX" or, for historical reasons, "C".

The POSIX definitions mirror the historical UNIX system behavior.

The use of symbolic names for characters in the tables does not imply that the POSIX locale must be described using symbolic character names, but merely that it may be advantageous to do so.
(from http://pubs.opengroup.org/onlinepubs/009695399/xrat/xbd_chap07.html)
jasuzuki
jasuzuki

Posts : 1
Join date : 2019-08-22

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum