siunitx
siunitx copied to clipboard
Italian localisation
Is it possible to have support for the Italian language? Below are keys and translations:
- exponent-product = \times
- inter-unit-product = \,
- output-decimal-marker = { , }
- list-final-separator = { e }
- list-pair-separator = { e }
About range-phrase
in Italian, two prepositions are used: da 1 a 3... da 10 kg a 12 kg...
Matteo
I've added the code in a branch for the next feature release. The da
part is not currently implemented as I don't include the 'from' phrase as standard. That's because it's not universally required: certainly in English I can say 'in the range X to Y' or 'in the range from X to Y' and both are correct. So I'm wary of adding anything here: the 'from' feels to me like an optional part of the text not a required part of specifying a range.
(Certainly adding a 'from' phrase would need to be handled separately as it's not specific to Italian, and I'll need to think about the semantics: if you need it for X-Y
, then it's not part of the siunitx
scope.)
Thank you for your answer.
So I'm wary of adding anything here: the 'from' feels to me like an optional part of the text not a required part of specifying a range.
Unfortunately, in Italian, it is a mandatory part: you cannot write/say "10 kg a 12 kg"...
Meanwhile thank you for the support!
Matteo
Unfortunately, in Italian, it is a mandatory part: you cannot write/say "10 kg a 12 kg"...
I suspected that, what I'm wondering is if you need it if you write the range without a word in it, e.g. do you write da X-Y kg
or not? That affects whether siunitx
should insert additional information.
what I'm wondering is if you need it if you write the range without a word in it, e.g. do you write da X-Y kg or not?
Even then, writing da X-Y kg
makes no sense :-(
Currently the only solution is to change the form of the sentence, writing, for example: "numbers in the range 5-9 are..." instead of "numbers 5 to 9 are...".
Matteo
I'll think a bit more about this and see if I can find a solution
Thank you very much.
Meanwhile, I would like to ask an off-topic question that perhaps does not need a separate discussion: why is it necessary to specify the locale
option even if you use babel/polyglossia
?
Writing:
\usepackage{polyglossia}
\setmainlanguage{german}
\usepackage[locale=DE]{siunitx}
seems to be a redundancy. If I needed to change some parameters that are set by language, it would seem more logical to me to change the parameter explicitly, for example:
\usepackage{polyglossia}
\setmainlanguage{german}
\usepackage{siunitx}
\sisetup{output-decimal-marker={,}}
But surely I am missing something :-)
Matteo
Thank you very much.
Meanwhile, I would like to ask an off-topic question that perhaps does not need a separate discussion: why is it necessary to specify the
locale
option even if you usebabel/polyglossia
? Writing:\usepackage{polyglossia} \setmainlanguage{german} \usepackage[locale=DE]{siunitx}
seems to be a redundancy. If I needed to change some parameters that are set by language, it would seem more logical to me to change the parameter explicitly, for example:
\usepackage{polyglossia} \setmainlanguage{german} \usepackage{siunitx} \sisetup{output-decimal-marker={,}}
But surely I am missing something :-)
I point out in the manual that you can link the locale and the language. The split arises as the settings in siunitx
are really about the typographic tradition wherever you do the typesetting, which I've called the locale. That's independent of the language the document happens to be written in. For example, in the UK we'd use .
for the decimal marker, and that would remain true even if the text is written in some other language (particularly say in a quote). So I leave the question of linking locale and language to the author.
I'm looking back at this: I think I have a general plan, just implementing the specifics
I've committed the partial fix I have plus a mechanism at 'my' end to do the 'from' part: I now need some changes in a support package to finalise a fix.
Pushing any further change to v3.4