11/12/2023 0 Comments Aptget install locale debiannano /etc/locale.gen # uncomment desired lines (locales) Locales are typically set by uncommenting lines in /etc/locale.gen, after which running locale-gen is required. To check the currently used locale, run any of the following commands (with minor output differences). To check the (already) generated locales, run any of the following commands (with minor output differences). Do not edit these manually, they will be overwritten on package upgrades.Ĭomprehensive details on locales at the Arch Wiki. The main configuration file, which has a simple format: every line that is not empty and does not begin with a # is treated as a locale definition that is to be built.Ī directory containing locale.gen snippets provided by language-pack packages. Basic infoĪccording to man locale-gen, locales are set in several files. Note: Some of the commands below require root privileges, consider the use of sudo. every locale not listed (and uncommented) in /etc/locale.gen. Sudo localedef -i en_GB -f UTF-8 en_GB.UTF-8īut this was not a permanent solution: I found that running locale-gen without the -keep-existing option will delete all such manually-generated locales, i.e. I was also able to generate locales manually like this: sudo localedef -i en_US -f UTF-8 en_US.UTF-8 However, when I modified that file manually and uncommented the locales that I wanted, then locale-gen started working properly: $ sudo locale-gen Running dpkg-reconfigure locales and selecting some locales did not update /etc/locale.gen as I expected it to. Generating locales (this might take a while). not generating any locales (none listed): $ sudo locale-gen I always got the following output from locale-gen, i.e. None of these answers worked for me, on an LXC container installed with: lxc-create -n sse-master -t download -n sse-master - \ There were a lot of Q&A entries regarding this subject but only a few were actually helpful. You can check that locale has been configured correctly by invoking locale. On the same shell, you will need to do source ~/.bashrc for the env vars to take effect immediately. # Uncomment en_US.UTF-8 for inclusion in generation The ff accomplished what I need but it should work just fine in an interactive shell. non-interactively) installed in a docker container. In my case I needed en_US.UTF-8 programmatically (i.e. After piecing together information from a few places, what worked for me was to (1) make sure the locale I wanted was available (generate it if it wasn't) then (2) set locale related environment variables to desired locale. Answers here are incomplete as with most elsewhere.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |