7

The arch wiki page says:

Locale names are typically of the form language[_territory][.codeset][@modifier]

Unfortunately it does not says what is "modifier".
What is that "modifier"? or is there documentation for that "modifier"?

2 Answers 2

9

There is no single unified meaning for the modifier. For example, in the early 2000s, when parts of the EU transitioned from their own national currencies to the Euro, the @euro modifier was used to indicate what the preferred currency should be.

For example, in Germany, if you had your locale set to de_DE.UTF-8 in the early 2000s, a banking program that uses the locale information to determine the default currency would probably have chosen DM as the default, but if you change the locale to de_DE.UTF-8@euro, the default might have been €.

Another possible use of a modifier might be a country that is transitioning between measurement systems, where you could have something like @si and @us. In Germany, the preferred formatting for telephone numbers has changed somewhat recently (i.e. during the lifetime of Unix), which is another thing that is part of a locale (or more precisely, is a GNU-specific extension), and thus there might conceivably be a modifier which controls whether to use the old or the new formatting.

Also, in Germany, there are two different widely-used sort orders for text:

  • DIN 5007-1 treats umlauts like their base letters (i.e. ä sorted the same as a) and sharp-s like double-s (i.e. ß sorts like ss).
  • "Phone book" style treats umlauts like their "expanded" variants (i.e. sorts ä like ae).

These variations could conceivably be specified using a modifier.

Really, the modifier can be used for anything where specifying the language, region, and codeset is not specific enough, like the case where in one country with the same language, there are two different currencies.

4
  • Q: will there be or should there be @modifier variants given the recent reform of French spelling, in particular the treatment of circonflex?
    – Krazy Glew
    Oct 9, 2022 at 3:02
  • I've also seen modifiers used for whether the user should be addressed formally or informally. Oct 9, 2022 at 8:18
  • @KrazyGlew : The reform you refer to only concerns the orthography. Nothing changing a single byte in the locale definition. Characters are identical, so are their encodings & keymappings
    – MC68020
    Oct 9, 2022 at 9:09
  • @KrazyGlew You could use a BCP 47 language tag to specify orthography rules. Since BCP 47 tags can also contain Unicode locale data via the u extension they can fulfil a similar role to a locale name (except for specifying the encoding, I think). See BCP 47, RFC 6067 and UTS #35 if you’re interested
    – dlrlc
    Oct 9, 2022 at 17:54
7

The @modifier setting specifies a variant. A minor addition in the encoding set. As an example :

European countries have long time relied on ISO definitions. Some French, for example (language fr, country FR) would have most probably set their codeset to ISO-8859-1 in the following way :

fr_FR.ISO-8859-1

Then comes a new currency, the Euro and the the associated currency symbol could be made available via Alt Gr E while keeping the ISO-8859-15 encoding.

fr_FR.ISO-8859-1@euro

Simply list the /usr/share/i18n/locales directory, you will discover a couple of other variants (@latin , @cyrillic…) available for some language_territory pairs.

3
  • Maybe add some information about the relation to the X server. There is a related page here. Oct 8, 2022 at 16:37
  • 2
    This reads somewhat confusing. If I understand correctly, you are saying that fr_FR.ISO-8859-15 would have been used before the Euro existed and fr_FR.ISO-8859-15@euro would have been used after the Euro. But, ISO-8859-15 was only created after the Euro, that's the whole point of this character encoding. It is mostly just ISO-8859-1 with the currency sign ¤ replaced by the Euro symbol . Oct 8, 2022 at 20:24
  • @JörgWMittag : I stand corrected. Thank you for noticing… :-)
    – MC68020
    Oct 9, 2022 at 9:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .