Artix Linux Forum

Init systems => runit => Topic started by: slblxs on 06 October 2018, 13:36:16

Title: I have two locations, on my Artix.
Post by: slblxs on 06 October 2018, 13:36:16

 I would like to extend my sincere congratulations to the entire Artix team. He has done a remarkable job, after installing and running Artix OpenRc, for some time he was waiting for an iso with runit.
  I tried several times to install with an iso base, but it always gave an error and I was never able to activate the network. Now I installed it through the new live cd lxqt runit, and everything is working, but I still can not figure out where the language configuration is. I apply a locale-gen and it appears us and pt.

Code: [Select]
[slb@sl ~]$ sudo locale-gen
[sudo] password for slb:
Generating locales...
  pt_PT.UTF-8... done
  en_US.UTF-8... done
  pt_PT.UTF-8... done
Generation complete.
[slb@sl ~]$


If possible I need your help to stay one, which will be pt. Thank you.
Title: Re: I have two locations, on my Artix.
Post by: konimex on 06 October 2018, 15:45:28
Language configurations are placed in /etc/locale.conf (a "mostly-compatible" manpage can be found here (https://jlk.fjfi.cvut.cz/arch/manpages/man/locale.conf.5), but the kernel command line part does not apply).
Unless you meant keyboard configurations, that's in /etc/vconsole.conf.

EDIT: Looks like I misread the problem. Oops.
Title: Re: I have two locations, on my Artix.
Post by: fungalnet on 06 October 2018, 18:36:57
check/search in /etc/locale.gen to see if you have pt_PT twice and both uncommented

Mine shows these unique lines for portugeuse
Code: [Select]
#pt_BR.UTF-8 UTF-8  
#pt_BR ISO-8859-1 
#pt_PT.UTF-8 UTF-8 
#pt_PT ISO-8859-1 
#pt_PT@euro ISO-8859-15
Title: Re: I have two locations, on my Artix.
Post by: slblxs on 07 October 2018, 13:16:36

I found out where the problem was, at the bottom of the locale-gen. It was like this, thank you.

Code: [Select]
###
#
# Locales enabled by Calamares
en_US.UTF-8 UTF-8
pt_PT.UTF-8 UTF-8
Title: Re: I have two locations, on my Artix.
Post by: ####### on 08 October 2018, 21:20:37
It's OK to have more than one locale uncommented in /etc/locale.gen. Those are the locales that will be generated by the command
# locale-gen
and you can see the available locales with
$ locale -a
But when there are several locales you need to choose which one to use as default, e.g. like this:
$ cat /etc/profile.d/customlocale.sh
#!/bin/sh
export LANG="pt_PT.utf8"

There are several places you can set this, and you can do that per user or system wide too.
env |grep LANG should show what you have set as default.
Say you had one locale set as a default, you can also use another temporarily by setting LANG in a shell like this:
$ LANG=de_DE.utf8
Then if you do say
$ xz --help
It will print the help in German. That is one reason you might want more than one locale.
The link konimex provided explains this too.
Not all apps have translations though, and there could be improvements in general I guess  ;D :
$ xz --helfen
xz: Unbekannte Option »--helfen«
xz: Versuchen Sie `xz --help' für mehr Informationen.

OpenRC has language support as  TODO item I believe.