Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Italian localisation #650

Open
matteofg opened this issue Mar 27, 2023 · 11 comments
Open

Italian localisation #650

matteofg opened this issue Mar 27, 2023 · 11 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@matteofg
Copy link

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

@josephwright josephwright self-assigned this Mar 27, 2023
@josephwright josephwright added the enhancement New feature or request label Mar 27, 2023
@josephwright josephwright added this to the v3.3 milestone Mar 27, 2023
@josephwright
Copy link
Owner

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.

@josephwright
Copy link
Owner

(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.)

@matteofg
Copy link
Author

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

@josephwright
Copy link
Owner

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.

@matteofg
Copy link
Author

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

@josephwright
Copy link
Owner

I'll think a bit more about this and see if I can find a solution

@matteofg
Copy link
Author

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

@josephwright
Copy link
Owner

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 :-)

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.

@josephwright
Copy link
Owner

I'm looking back at this: I think I have a general plan, just implementing the specifics

@josephwright
Copy link
Owner

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.

@josephwright
Copy link
Owner

Pushing any further change to v3.4

@josephwright josephwright modified the milestones: v3.3, v3.4 Jul 27, 2023
josephwright added a commit that referenced this issue Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants