Translating the language menu itself

Translating the language menu itself

by Visvanath Ratnaweera -
Number of replies: 8
Picture of Particularly helpful Moodlers Picture of Translators

A discussion in the German language forum made me to look at the logic of translating the language menu itself. This is what I think logical, taking a site delivered in German, English, Sinhalese and Tamil as an example (the first column is the active language):

Deutsch (de) Englisch (en) Sinhalesisch (si) Tamilisch (ta)
English (en) German (de) Sinhalese (si) Tamil (ta)
සිංහල (si) ජර්මානු (de) ඉංග්රීසි (en) දෙමළ (ta)
தமிழ் (ta) ஜெர்மன் (de) ஆங்கிலம் (en) சிங்களம் (si)

The differences to the current practice are:

  • The language that is active is not on the selection list
  • The names of the languages are in the active language

Not something critical. Still, would like to hear your opinion.

Average of ratings: -
In reply to Visvanath Ratnaweera

Re: Translating the language menu itself

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

The names of the languages are in the active language

I am not sure I understood this well - are you suggesting that the menu should be displayed using the current language's names of other languages? Surely that would not be a good idea. If a British gentleman comes to my Czech Moodle site, how would he know he has to switch the language to "Angličtina"? Not to mention that every translator would have to translate all other language names.

In reply to David Mudrák

Re: Translating the language menu itself

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi David

Thanks for the response!

>> The names of the languages are in the active language
>
> are you suggesting that the menu should be displayed using the current language's names of other languages?

Exactly.

> Surely that would not be a good idea. If a British gentleman comes to my Czech Moodle site, how would he know he has to switch the language to "Angličtina"?

Well, I am not an expert on this. (But the example was a real one.)

I thought of this complication. It could even be worse: An English gentlemen may not immediately recognize ඉංග්රීසි as his own language.
;-P

We have to look deeper in to this. Firstly, why does he see the site in Sinhalese (and as a result seeing 'ඉංග්රීසි' instead of 'English')? The only possibility is that, in his browser he has added Sinhalese to his language list and put that above English. So he can't be be clueless.

Note: I should have mentioned it earlier. I am not talking of a user who is logged in. Then the language setting of his profile comes in to the picture. No, I am talking of the "Guest" as in Moodle.

Secondly, there is a language code in the string, it is 'ඉංග්රීසි (en)' and not just 'ඉංග්රීසි'.

OK, you may ask Why? Just the aesthetic reason, say if you know only one language (out of the list), everything, including the language menu, is in that language.

> Not to mention that every translator would have to translate all other language names.

No, I haven't thought of that. What you say is that every language pack has to have the names of all the other language packs in its own language? Kind of obvious to me. When I work in Sinhala, ඉංග්රීසි is an important word whose meaning 'English' I should know!
In reply to Visvanath Ratnaweera

Re: Translating the language menu itself

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
BTW, what is the logic followed by Moodle?

The alternative I could think is to keep the names of the languages (in the selection list) always in its own language. In the example above those would be: Deutsch (de) | Englisch (en) | සිංහල (si) | தமிழ் (ta).

What I get is: Deutsch (de) | Englisch (en) | Tamil (ta) | සිංහල (si). [in that order]
In reply to Visvanath Ratnaweera

Re: Translating the language menu itself

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Sorry, there was a typo in my previous post. This is the corrected version:

> What I expect: Deutsch (de) | English (en) | සිංහල (si) | தமிழ் (ta).
>
> What I get: Deutsch (de) | English (en) | Tamil (ta) | සිංහල (si). [in that order]

The differences are:
a. Tamil (ta) should be தமிழ் (ta)
b. Tamil (ta) should come after සිංහල (si), assuming the list is according to the language code (de | en | si | ta).
In reply to Visvanath Ratnaweera

Re: Translating the language menu itself

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

re a. - this is because the Tamil language pack has the string "thislanguage" (in the core_langconfig component) translated as "Tamil" - please feel encouraged to contribute a fix at lang.moodle.org

re b. - no, the languages are ordered by the displayed language name, not the language code. I admit though that "alphabetically" does not really makes sense in this case, as there are words from different languages with different alphabets. There is not an easy solution for this generally and I assume that the current behaviour has been seen as a lesser evil (sorting by code would make it harder to find your language if you are not aware of its ISO 692 code).

A workaround for you might be to set the list of offered languages via the admin setting "Languages on language menu (langlist)".

Average of ratings: Useful (3)
In reply to David Mudrák

Re: Translating the language menu itself [CLARIFIED]

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hallo David

Thanks for the clarifications. I do not want to change anything in Moodle, just to understand its logic. Your reply provided the answers:

>> a. Tamil (ta) should be தமிழ் (ta)
> this is because the Tamil language pack has the string "thislanguage" (in the core_langconfig component) translated as "Tamil" - please feel encouraged to contribute a fix at lang.moodle.org

OK, the problem is in the language pack. This also explains why the name of a language, for example in the selection list, is always _one_ string, the string "thislanguage". It also explaines why the original idea, of translating language string in to other languages is difficult. I too think that the gain in doing so is not in proportion to its cost.

As already said, I don't want to change anything. I am not going to touch the tamil language pack.

>> b. Tamil (ta) should come after සිංහල (si), assuming the list is according to the language code (de | en | si | ta).re a. - t
> no, the languages are ordered by the displayed language name, not the language code. I admit though that "alphabetically" does not really makes sense in this case, as there are words from different languages with different alphabets.

Interesting. This is a side effect of the unicode, which is not an alphabet but the alphabet of all alphabets! So for example, all Tamil words come before any Sinhalese word because the Tamil alphabet comes before the Sinhala alphabet. Have to digest that!

> There is not an easy solution for this generally and I assume that the current behaviour has been seen as a lesser evil (sorting by code would make it harder to find your language if you are not aware of its ISO 692 code).
>
> A workaround for you might be to set the list of offered languages via the admin setting "Languages on language menu (langlist)".

I am OK with the workaround.
In reply to Visvanath Ratnaweera

Re: Translating the language menu itself [CLARIFIED]

by Robert Brenstein -
Just want to add that the approach used by Moodle, I mean showing the language names in its own language, is also used by sites like Facebook, so it follows the internet practice. It is more a universal solution IMHO than showing all languages in the browser's language, aside from the extra effort that supporting that would require. What David mentioned as a workabout is really a feature AFAIAC.
In reply to Robert Brenstein

Re: Translating the language menu itself [CLARIFIED]

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Robert

Did I say that the Moodle approach is wrong? Please read (quoted from my previous post):
> This also explains why the name of a language, for example in the selection list, is always _one_ string, the string "thislanguage". It also explaines why the original idea, of translating language string in to other languages is difficult. I too think that the gain in doing so is not in proportion to its cost.

So we agree on the result, but for different reasons. Firstly, I am not on Facebook, so I don't know what it does. Secondly, what Facebook does is not necessarily (for me) the internet practice. Facebook is not the Internet!