Skip to content

Switch language #48

Closed Answered by penguin-teal
Vinicius-Madeira asked this question in Q&A
Discussion options

You must be logged in to vote

Sure! I've thought about making a language selector before, just haven't gotten around figuring out how (or if) to do it with GNU gettext.

The system language is measured using the LANG environment variable (plus some other locale variables). You can see your current locale with:

$ locale

(Note that you will see like 20 different variables print out, but changing the LANG variable will change them all)

To see all installed languages do:

$ locale -a

You'll see something like:

C
C.utf8
en_US.utf8
POSIX
zh_CN.utf8

en_US.utf8 is UTF-8 American English and zh_CN.utf8 is UTF-8 Chinese. If you don't see the language you want you will have to install it which is distro-specific (your locale must…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Vinicius-Madeira
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants