Multi-language support

The only "not so easy to understand" thing might be the selection of different plurals depending on a number.
Some languages do not only have one singular and plural form (If I remember correct polish has a concept of "one", "two" and "many"...but I might confuse that with another language ;) ).

PS: This was the comment I added for the polish translation - whether this statement is true has to be confirmed by someone else ;) :
"[...]in Polish there are three plural forms. There is a form for the singular,a form used when the number ends in 12, 13 or 14, and a form for all other cases.[...]"

The answer is both "yes" and "no". I understand that you mean how to decline nouns when they are preceded by a cardinal number. It's not easy to explain it in simple terms, but I'll try to illustrate it.

Let's consider the noun "wahadłowiec" ("space shuttle” in Polish) as an example. Below is a charter with the full declension paradigm of this noun by cases:


Grammatical case
(of the noun)
Singular numberPlural number
Nominativewahadłowiecwahadłowce
Genetivewahadłowcawahadłowców
Dativewahadłowcowiwahadłowcom
Accusativewahadłowiecwahadłowce
Instrumentalwahadłowcemwahadłowcami
Locativewahadłowcuwahadłowcach
Vocativewahadłowcuwahadłowce

As we can see, in Polish there are seven grammatical cases, as inherited from the Proto-Balto-Slavic language spoken 2000 BC (just like in e.g. contemporary Czech and Lithuanian, which stem from the same Balto-Slavic protolanguage). There are also two grammatical numbers: singular and plural (until the 15th century, there was also a dual number, which was already in decline even at that time, and has survived only as a relic to this day). Not only nouns, but also adjectives, cardinal numbers, and ordinal numbers are subject to declension in these seven cases.

Referring to your question, if the cardinal numeral is declined itself in the nominative, accusative or vocative case AND simultaneously:

a) if a number ends with 1, 5, 6, 7, 8, 9 or 0 — then the subsequent noun should be declined in the genetive case;

b) if a number ends with 2, 3 or 4 — then the subsequent noun should be declined in the nominative case. This rule shall not apply to 12, 13, 14 and their later repetitions (e.g. 112, 113, 114, 212, 213, 214, 511, 1012, 8714, 162812 and so on) — in this instance, the subsequent noun has to be declined in the genetive case (just like numerals ending with 1, 5, 6, 7, 8, 9 or 0).

Here are a few examples. Let's assume that the numerals are given in the nominative, accusative or vocative case (for simplicity's sake, I have written them as numbers rather than words). The subsequent nouns following these numerals will take either the nominative or genitive form, according to the rules described above.

1 wahadłowiec [singular nominative]
2, 3, 4 wahadłowce [plural nominative]
5-21 wahadłowców [plural genetive]
22-24 wahadłowce [plural nominative]
25-31 wahadłowców [plural genetive]
32-34 wahadłowce [plural nominative]
35-41 wahadłowców [plural genetive]
42-44 wahadłowce [plural nominative]
45-51 wahadłowców [plural genetive]
52-54 wahadłowce [plural nominative]
55-61 wahadłowców [plural genetive]
62-64 wahadłowce [plural nominative]
65-71 wahadłowców [plural genetive]
72-74 wahadłowce [plural nominative]
75-81 wahadłowców [plural genetive]
82-84 wahadłowce [plural nominative]
85-91 wahadłowców [plural genetive]
92-94 wahadłowce [plural nominative]
95-101 wahadłowców [plural genetive]
102-104 wahadłowce [plural nominative]
105-121 wahadłowców [plural genetive]

This problem does not occur if the plural form of a numeral is declined in the genetive, dative, instrumental and locative cases. In these instances, the plural forms of "2/3/4s" and "0/1/5/6/7/8/9/12/13/14s" are exactly the same (as marked on green below).

The aforementioned discrepancy occurs only if a numeral is declined in the nominative, accusative and vocative cases — the plural forms of "2/3/4s" nouns follow the same case as the numeral, but the plural forms of "0/1/5/6/7/8/9/12/13/14s" nouns doesn’t comply with the case of the numeral, and they are declined on their own in the genetive:


Grammatical case
(of the nume
ral)
"Two / three / four space shuttles""Five space shuttles"
Nominativedwa / trzy / cztery wahadłowcepięć wahadłowców
Genetivedwóch / trzech / czterech wahadłowców pięciu wahadłowców
Dativedwóm / trzem / czterem wahadłowcom pięciu wahadłowcom
Accusativedwa / trzy / cztery wahadłowcepięć wahadłowców
Instrumentaldwoma / trzema / czterema wahadłowcami pięcioma wahadłowcami
Locativedwóch / trzech / czterech wahadłowcachpięciu wahadłowcach
Vocativedwa / trzy / cztery wahadłowcepięć wahadłowców

If you have more questions, feel free to ask.
 
Last edited:
...what could be left to ask :D. That was a very informative reply. But to be honest, I don't think I'll try to remember all of it 😜
I do remeber however the large code-changes that some cases (grammatical case) introduced to the code-base back then.
If orbiter should provide real multi-language support, it can only be of good quality if real people with knowledge of the language (basic for the source , english ... and "proper" for the destination) work on it.
 
Last edited:
I've set the PR as ready for review. Feedback appreciated, especially if you can read French...
If you have a github account, a precompiled archive is provided in the PR (will last one week IIRC).
 
hi, nice to see that!, I can see many .pot in your commit (https://github.com/orbitersim/orbiter/pull/634/files). As I reviewed only one, if you did not review the others, do you request a review for all of the .pot?
I did the translation as a way of testing the behavior of the core but if other French speakers can provide feedback on the translation quality, I'd be happy.
If your fileserver is still up, I can upload a new version, sometimes it's easier when you see how it looks like.
The other point that needs reviewing is the code behind the scene that handles the translation files.
There's also a small documentation here.
 
if the review concerns all *.fr_FR.po, I can take them from your PR, it's ok. Sorry, I can't help on the code these days.
 
It is much more easy to have all translations in one .po file.
No multiple translations of "cancel" for example. If it has been translated once it's enough!
Having to look for all "cancel"s in all files is heading for desaster. That's at least my experience.
If one "concel" is special (because it is a name for example, that must be handled different), you have to add a 2nd ID anyhow.
 
It is much more easy to have all translations in one .po file.
No multiple translations of "cancel" for example. If it has been translated once it's enough!
Having to look for all "cancel"s in all files is heading for desaster. That's at least my experience.
If one "concel" is special (because it is a name for example, that must be handled different), you have to add a 2nd ID anyhow.
There is only one .po file for the Orbiter "core". The other files are for modules and playbacks.
I tried first with sharing everything but it turned out to be a mess when trying to figure out how to translate words like "All", "Closed" or "Forward" out of the blue. I ended up adding a context per dialog, even if that produces some duplicates in English. You open the dialog in Orbiter and have the editor in another window on that context ; I find it easier to manage than a list of random words. Maybe a professional translator would find it a poor solution but I'm not one.
There is no assumption about how different languages handle duplicates. In French for example "Closed" could be "Fermé", "Fermés", "Fermée" or "Fermées" depending on context. For all I know there can be a language where "Cancel" can have different translations depending on what is cancelled.

Each module has its own .po file because I prefer to keep related things together but that can be changed. There are provisions to use Orbiter strings from modules if need be. This will require documenting the list of available strings, their context, and making sure they don't disappear in the future.

For scenario playbacks, I don't really like the one .po per playback thing. I don't like having a huge file with everything either... They are stories in their own right and at least with the "one per" alternative you can follow the playback more naturally and you can tell yourself "OK, today i'm gonna translate the DG to the moon tutorial".

Edit : after rereading this it sounds a bit harsh. I'm opened to suggestions, it's just that this is the best solution I could come up with that provided an acceptable workflow...
 
Last edited:
No it didn't sound harsh. It is just your reasoning - nothing wrong with that.
I just wanted to give my impression & experience input. Please do not read it as "you have to do it this way!" :)
 
Hi, I've just started, you'll find progressively your files in this : https://share.obspm.fr/s/qbf9d4oTQacnE3Z

I will tell you once completed.

EDIT (March 28): all done -> @Gondos : see .zip attached, hopefully the file tree is correct
Awesome work, thanks! I looked at it quickly, I think I'll take most of it into account.
Maybe since you actually had to parse through all of this, you have some insight about the multiple files vs single file option?
 
My feeling is that keeping "specialized" files is better, because the most difficult in translations is the context, i.e. the "atmosphere" that must be translated. Then, multiple files is a way to clarify the context of each, even if that makes repetitions. In addition, personally, I am more in the "today i'm gonna translate the DG to the moon tutorial" psychology ;)
 
I've pushed a way to change the locale directly from Orbiter (ingame, from the Options/Language dialog). A build is available here for people with a github account.
I don't think I'll push any more i18n stuff before this one is merged, the PR is already quite big.
Remaining work that will be done later : MFDs, and also the launchpad and scenario editor once they are ported to ImGui.
 
Back
Top