# Turn OFF NLS completely (localization problems)



## YuryG (May 12, 2020)

Is there any way to turn off any signs of NLS. I do not want …it! I even put `OPTIONS_UNSET+=NLS` into /etc/make.conf (I build all from sources: system and ports.)
Somehow, after some strange update, I've got MATE to translate me all to Russian (and without needed symbols in terminal).
I do not want that gibberish. I do not want it even to compile into application's data. Is there any way? And how it can be at least switched to English in MATE?


----------



## SirDice (May 12, 2020)

Several ports don't allow you to disable that option. Some ports don't even build without it.


----------



## T-Daemon (May 12, 2020)

What are your localization settings?


----------



## YuryG (May 12, 2020)

T-Daemon said:


> What are your localization settings?


The problem is I do not know, where to look for them.
Before xorg-server upgrade everything was in English, but somehow now it is in Russian.


----------



## YuryG (May 12, 2020)

SirDice said:


> Several ports don't allow you to disable that option. Some ports don't even build without it.


But I do not want it, not only ports, but even in system date output! Or decimal sign change in sysctl output (see attached picture)…


----------



## SirDice (May 12, 2020)

YuryG said:


> But I do not want it, not only ports, but even in system date output! Or decimal sign change in sysctl output (see attached picture)…


locale(1) and  NLS are two different  things. Related but separate.

Chapter 22. Localization - i18n/L10n Usage and Setup


----------



## YuryG (May 12, 2020)

SirDice said:


> locale(1) and  NLS are two different  things. Related but separate.
> 
> Chapter 22. Localization - i18n/L10n Usage and Setup


Thank you, I was not sure in the word I used for the issue. As you see, I meant any localizations.
Some mystery happen here also. I used file ~/.login_conf but it worked only for the second time I started MATE.


----------



## SirDice (May 12, 2020)

YuryG said:


> I was not sure in the word I used for the issue. As you see, I meant any localizations.


I'm unsure which one you don't like or want to change. From the screenshot you posted, is it the Russian menus you don't want? That's the language setting in MATE. Or is the problem the weird characters in that terminal session? Those are probably caused by a wrong locale(1) setting.


----------



## YuryG (May 13, 2020)

SirDice said:


> I'm unsure which one you don't like or want to change. From the screenshot you posted, is it the Russian menus you don't want? That's the language setting in MATE. Or is the problem the weird characters in that terminal session? Those are probably caused by a wrong locale(1) setting.


Firstly, I do not aware where MATE language option is. It uses locale LANG setting for its interface, as I can see it.
More than weird symbols, I do dislike "translations" of system messages including decimal point transfiguration into decimal coma ("Russian tradition"), date format etc.
But, thanks to you I've got a clue, and changed ~/.login_conf  to have a solution. Although it worked only on the second MATE start somehow, and setenv line in this file happen not working, all locale options are copied from LANG (I tried some of them to be different).


----------



## T-Daemon (May 13, 2020)

YuryG said:


> I do not aware where MATE language option is.


I remember vaguely in Mate being a _Control Center_  -> _Regional Settings _option. Check that out ( if there is ).



YuryG said:


> More than weird symbols, I do dislike "translations" of system messages including decimal point transfiguration into decimal coma ("Russian tradition"), date format etc.


If there are such translations, then it's definitively the result of a localization setting. A official, default FreeBSD installation doesn't set a foreign language localization by itself, so don't userland programs.

The terminal in the image of the first posting has a error message, printing:_ Invalid UTF-8 string following below: _
and considering the terminals window title and menu items are translated, there is somewhere a localization set, on the user login or desktop environment level.

What you can do is post your ~/.login_conf , and
- output of `locale`,
- run in the users $HOME directory a `grep -ri utf-8` ( or LANG, or what `locale` may print )
- eventually check as root `chpass <user_name>` the users `Class:` setting,

Can it be that someone is playing a prank on you, a colleague, a friend maybe, changed the localization, or changing it constantly, remotely, knowing you don't like a translated system?


----------



## YuryG (May 13, 2020)

T-Daemon said:


> I remember vaguely in Mate being a _Control Center_  -> _Regional Settings _option. Check that out ( if there is ).


I do not see such. That's the problem. I was shocked that after upgrading (to EVDEV and similar troubles to come) without changing language options anywhere, I got different language in MATE's interface. May it be a new UDEV/EVDEV keyboard policy? (From that I have pending problem with lost "MENU" key, it refused now to be interpreted pressed and keyboard clayms to be 104 keys instead of 105.)

I have this in ~/.login_conf now, and interface is in English again and terminal not writing uninterpreted UTF_8

```
me:\
    :lang=en_GB.UTF-8:\
    :charset=UTF-8:\
    :setenv=LC_ALL=en_GB.UTF-8,LC_COLLATE=en_GB.UTF-8,LC_CTYPE=POSIX,LC_MESSAGES=en_GB.UTF-8,LC_MONETARY=POSIX,LC_NUMERIC=POSIX,LC_TIME=ru_RU.UTF-8:
```

But setenv do not work from this file (I used example from Handbook).

```
LANG=en_GB.UTF-8
LC_CTYPE="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_ALL=en_GB.UTF-8
```
So, I could think my issue with localizations is somehow solved.



> Can it be that someone is playing a prank on you, a colleague, a friend maybe, changed the localization knowing you don't like a translated system?


I do not want even thinking about it, because it is my personal computer at home, no one have physical access to it. )


----------



## memreflect (May 13, 2020)

YuryG said:


> :setenv=...,LC_TIME=ru_RU.UTF-8:


*LC_TIME* affects the time and the date, which is why your date is in Russian.  Everything else in your new screenshot appears to be in English, so that hopefully means you fixed the problem.  It is possible that /etc/login.conf is the reason everything was in Russian.  Otherwise you wouldn't need to use _setenv_ in ~/.login_conf.


----------



## SirDice (May 13, 2020)

Don't set LC_ALL. It overrules all the other LC_* variables.


----------



## YuryG (May 13, 2020)

SirDice said:


> Don't set LC_ALL. It overrules all the other LC_* variables.


But it is in the Handbook's example: «22.2.1.1. Login Classes Method».


----------



## YuryG (May 13, 2020)

memreflect said:


> *LC_TIME* affects the time and the date, which is why your date is in Russian.  Everything else in your new screenshot appears to be in English, so that hopefully means you fixed the problem.  It is possible that /etc/login.conf is the reason everything was in Russian.  Otherwise you wouldn't need to use _setenv_ in ~/.login_conf.


You got it wrong. It is the file after problem resolution.
But thank you, I shall review these values.


----------



## T-Daemon (May 13, 2020)

YuryG said:


> But it is in the Handbook's example: «22.2.1.1. Login Classes Method».


The example there is erroneous. You can see it at your `locale` output, the variables after `LC_ALL` are not respected, LC_TIME for example.



YuryG said:


> ```
> me:\
> :lang=en_GB.UTF-8:\
> :charset=UTF-8:\
> ...



I didn't notice`LC_CTYPE=POSIX,LC_MONETARY=POSIX,LC_TIME=ru_RU.UTF-8`, following setting should suffice:

```
me:\
    :lang=en_GB.UTF-8:\
    :charset=UTF-8:\
    :setenv=LC_CTYPE=POSIX,LC_MONETARY=POSIX,LC_NUMERIC=POSIX,LC_TIME=ru_RU.UTF-8:
```


----------



## SirDice (May 13, 2020)

YuryG said:


> But it is in the Handbook's example


It's an _example_.


----------



## T-Daemon (May 13, 2020)

memreflect said:


> It is possible that /etc/login.conf is the reason everything was in Russian. Otherwise you wouldn't need to use _setenv_ in ~/.login_conf.


Right. The question remains why the user is forced a russian localization upon. I also would check out /etc/login.conf and in addition `grep russian /etc/master.passwd`, and grep(1) the users $HOME directory for localization.


----------



## YuryG (May 13, 2020)

SirDice said:


> It's an _example_.


Not working example in the Handbook? Very nice. (


----------



## YuryG (May 13, 2020)

T-Daemon said:


> Right. The question remains why the user is forced a russian localization upon. I also would check out /etc/login.conf and in addition `grep russian /etc/master.passwd`, and grep(1) the users $HOME directory for localization.


Well, there was "ru_RU.KOI8-R" in ~/.login_conf previously, but somehow it did not spoil all my MATE's language for years (and did not helped with terminal symbols translations), but now this changed.
And when I was struggling without keyboard and changed UDEV/DEVD options to-and-from in x11-servers/xorg-server port, the language of MATE's interface somehow changed to and from Russian (when I had not changed ~/.login_conf yet).


----------



## Criosphinx (May 13, 2020)

The file /etc/login.conf contains a "russian" login class. But it would be very hard to change the login class by mistake, `adduser` uses default and the ~/.login_conf file created for new users is set to de_DE and commented out.

Try adding a new user and see if it is created with the defaults.


----------



## SirDice (May 14, 2020)

YuryG said:


> Not working example in the Handbook? Very nice.


The example works just fine. But it could use some explaining _why_  LC_ALL was set.


----------



## YuryG (May 14, 2020)

SirDice said:


> The example works just fine. But it could use some explaining _why_  LC_ALL was set.


Really? It's explained that settings in the example are for different LC_* values (and that it has some meaning), and the example included LC_ALL. But you say, that LC_ALL obscures all other values, don't you?


----------



## SirDice (May 14, 2020)

YuryG said:


> But you say, that LC_ALL obscures all other values, don't you?


It does. 

```
dice@armitage:~ % locale
LANG=
LC_CTYPE="C"
LC_COLLATE="C"
LC_TIME="C"
LC_NUMERIC="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_ALL=
dice@armitage:~ % date
Thu May 14 12:16:36 CEST 2020
dice@armitage:~ % setenv LANG en_GB.UTF-8
dice@armitage:~ % date
Thu 14 May 2020 12:16:58 CEST
dice@armitage:~ % env LC_ALL=nl_NL.UTF-8 date
do 14 mei 2020 12:17:23 CEST
```


----------

