LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-17-2024, 12:12 PM   #16
however
Member
 
Registered: Jan 2019
Distribution: slackware current
Posts: 497

Original Poster
Rep: Reputation: Disabled

Quote:
Originally Posted by Petri Kaukasoina View Post
There is no such locale: en_MT.UTF-8. (There is mt_MT.utf8).
well, i didn't choose it as I am guessing it happens when, in a country, there are more than one official language?

Now, the question is, how do i change it? Do I write my locale by editing /etc/profile.d/lang.sh?
 
Old 04-17-2024, 02:08 PM   #17
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,366

Rep: Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082Reputation: 4082
Quote:
Originally Posted by however View Post
well, i didn't choose it as I am guessing it happens when, in a country, there are more than one official language?

Now, the question is, how do i change it? Do I write my locale by editing /etc/profile.d/lang.sh?
Yes, your system wide locale must be set there

Supported "locale" are here:
=> /usr/share/locale/
Code:
$ locale -a

Last edited by marav; 04-17-2024 at 02:10 PM.
 
Old 04-17-2024, 03:20 PM   #18
however
Member
 
Registered: Jan 2019
Distribution: slackware current
Posts: 497

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by marav View Post
Yes, your system wide locale must be set there

Supported "locale" are here:
=> /usr/share/locale/
Code:
$ locale -a

I don't get it though! My /etc/profile.d/lang.sh is set to LANG=en_US.UTF-8

Code:
#!/bin/sh
# Set the system locale.  (no, we don't have a menu for this ;-)
# For a list of locales which are supported by this machine, type:
#   locale -a

# en_US.UTF-8 is the Slackware default locale.  If you're looking for
# a different UTF-8 locale, be aware that some of them do not include
# UTF-8 or utf8 in the name.  To test if a locale is UTF-8, use this
# command:
#
# LANG=<locale> locale -k charmap
#
# UTF-8 locales will include "UTF-8" in the output.
export LANG=en_US.UTF-8

Quote:
bash-5.2# set | grep LC
LC_ALL=
LC_COLLATE=C
LC_MONETARY=en_MT.UTF-8
MAILCHECK=60
bash-5.2#
Am i completely wrong or, this shows that the line 'LC_MONETARY is set to en_MT.UTF-8 (what is LC-MONETARY)

Should i edit the 'LC_MONETARY' line in this case? if so, where is it?
 
Old 04-18-2024, 01:01 AM   #19
however
Member
 
Registered: Jan 2019
Distribution: slackware current
Posts: 497

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Petri Kaukasoina View Post
Code:
$ LC_MONETARY=en_MT.UTF-8 python
Python 3.11.9 (main, Apr  2 2024, 13:43:44) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.setlocale(locale.LC_ALL, '')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python3.11/locale.py", line 627, in setlocale
    return _setlocale(category, locale)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
locale.Error: unsupported locale setting
>>>
My 'locale' is set to the correct language
Code:
#!/bin/sh
# Set the system locale.  (no, we don't have a menu for this ;-)
# For a list of locales which are supported by this machine, type:
#   locale -a

# en_US.UTF-8 is the Slackware default locale.  If you're looking for
# a different UTF-8 locale, be aware that some of them do not include
# UTF-8 or utf8 in the name.  To test if a locale is UTF-8, use this
# command:
#
# LANG=<locale> locale -k charmap
#
# UTF-8 locales will include "UTF-8" in the output.
export LANG=en_US.UTF-8
how do i edit the LC_MONETARY?
 
Old 04-18-2024, 01:10 AM   #20
henca
Member
 
Registered: Aug 2007
Location: Linköping, Sweden
Distribution: Slackware
Posts: 963

Rep: Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650
Quote:
Originally Posted by however View Post
(what is LC-MONETARY)
That variable says something about how values and currencies should be displayed. Different countries might have different preferences like:

1 000,00 €
1,000.00 $

Quote:
Originally Posted by however View Post
Should i edit the 'LC_MONETARY' line in this case? if so, where is it?
On my Slackware 15.0 system it has not been set at all. On your system, it has probably been set in some login file of yours or possibly by some desktop environment.

regards Henrik
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sbopkg_gui for current and g-slpkg a gui for slpkg rizitis Slackware 5 08-26-2023 04:38 PM
Slpkg New Slackware packaging tool dslackw Slackware 228 11-23-2022 02:04 AM
slpkg usage question: how to upgrade *installed* packages wireshark Slackware 8 11-16-2015 11:47 PM
confused about iojs installation using slpkg Sefid par Slackware 4 08-31-2015 07:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration