Feature No Code Attached Yet
avatar dautrich
dautrich
26 Dec 2024

Steps to reproduce the issue

  1. Make sure your Windows and your browser are set to locale “Deutschland” (or de-DE, where applicable).
  2. Try to install a J5 version, i. e. 5.2.2

Expected result

The installation language is displayed as “German (Germany) | Deutsch (Deutschland)”.

Actual result

The installation language is displayed as “German (Austria) | Deutsch (Österreich)”.

Image

System information (as much as possible)

Windows 11 (Home or Pro)
Firefox 133.0.3 (or earlier) or Microsoft Edge 131.0.2903.112 (or earlier)

Additional comments

No issue with Google Chrome (tested on 131.0.6778.205)

I have seen set since the first J5 releases and already had a discussion with @tecpromotion about that topic in February 2024.

avatar dautrich dautrich - open - 26 Dec 2024
avatar joomla-cms-bot joomla-cms-bot - change - 26 Dec 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 26 Dec 2024
avatar dautrich dautrich - change - 26 Dec 2024
The description was changed
avatar dautrich dautrich - edited - 26 Dec 2024
avatar tecpromotion
tecpromotion - comment - 26 Dec 2024

Sorry but I can't reproduce this in my local test environment with 5.2.3 RC 1.
It works as expected here.

Tested with Chrome, Firefox and Safari.

avatar dautrich dautrich - change - 26 Dec 2024
The description was changed
avatar dautrich dautrich - edited - 26 Dec 2024
avatar fgsw
fgsw - comment - 26 Dec 2024

Can't confirm too (Mac, Firefox).

avatar brianteeman
brianteeman - comment - 26 Dec 2024

@tecpromotion I assume as you tested with safari that you are like @fgsw testing on a Mac and not the reported issue on Windows

avatar tecpromotion
tecpromotion - comment - 26 Dec 2024

That's right. But I have already written to Rolf. We will try to reproduce this in the German-speaking community. Maybe we'll find out something.

avatar richard67
richard67 - comment - 26 Dec 2024

@dautrich @tecpromotion @fgsw Could you inspect the request header for the "GET" request in the network traffic analysis of your browser's developer tools?

There should be an Accept-Language header.

See e.g. screenshot from my browser (German Firefox latest version on Windows):

Image

In my case the value is de-DE,de;q=0.8,en-US;q=0.5,en;q=0.3, and I cannot reproduce the issue on a current 5.2-dev branch.

You can test that with any GET request to any (valid) URL.

Please check and report back your values for that Accept-Language header.

avatar richard67 richard67 - change - 26 Dec 2024
Labels Added: Information Required
avatar richard67 richard67 - labeled - 26 Dec 2024
avatar richard67
richard67 - comment - 26 Dec 2024

Same result (issue not reproduced) with Chrome, however with a different value for the header, compared to Firefox:
Image

And same (issue not reproduced with different header compared to Firefox or Chrome) with Edge:
Image

avatar fgsw
fgsw - comment - 26 Dec 2024

@richard67 Firefox is set to English, for this test preferred Language on "German [de]", give:

Image

avatar richard67
richard67 - comment - 26 Dec 2024

@fgsw Hmm, so in your case it finds the right language even if your header has no "de-DE", only "de". The ordering of the list field in the form is so that "de-AT" comes before "de-DE", so it seems in your case it does not just pick the first "de-something" which it can find. Strange. So we have to wait what @dautrich reports for the case in which he can reproduce the issue.

avatar dautrich
dautrich - comment - 26 Dec 2024

Accept-Language | de,en-US;q=0.7,en;q=0.3

Screenshot from my Firefox:
Image

avatar richard67 richard67 - change - 26 Dec 2024
Labels Removed: Information Required
avatar richard67 richard67 - unlabeled - 26 Dec 2024
avatar dautrich
dautrich - comment - 26 Dec 2024

Microsoft Edge: accept-language: de,de-DE;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6

Image

avatar richard67
richard67 - comment - 26 Dec 2024

@dautrich So in your case as well as in @fgsw 's you don't have a "de-DE", only "de", but in opposite to him you have "en-US".

What happens if you either modify the header in the developer tools or if you change the settings as shown in following screenshots?

Image

Image

I think in your case the one at the top is missing. But you can add it and move it to the top with that dialogue.

avatar dautrich
dautrich - comment - 26 Dec 2024

That does the trick: I get
Accept-Language | de-DE,de;q=0.8,en-US;q=0.5,en;q=0.3
resulting in that:

Image

avatar richard67
richard67 - comment - 26 Dec 2024

So that is at least a feasible workaround. If we have an issue or not I don’t really know. But it seems weird to me that in your case with the issue de-AT was used and in @fgsw ‘s case de-DE.

It would need to check the code to see how it works.

avatar richard67
richard67 - comment - 26 Dec 2024

P.S. I don’t really remember if the de-DE language was in my Firefox settings by default or if I once had added it myself.

avatar dautrich
dautrich - comment - 26 Dec 2024

The same mechanism works in Microsoft Edge.
When I move "Deutsch (Deutschland)" to the top of the list, I get my preferred language setting:

Image

avatar dautrich
dautrich - comment - 26 Dec 2024

@richard67 Would it be possible to default to "Deutsch (Deutschland)", if the first language in the Accept-Language list is "de"?

avatar richard67
richard67 - comment - 26 Dec 2024

The same mechanism works in Microsoft Edge. When I move "Deutsch (Deutschland)" to the top of the list, I get my preferred language setting:

That’s what I would expect.

But the question is what shall happen if only de is given and not de-DE:

Shall it take the first de-something which it can find in alphabetical order? Then it would be de-AT.

Or shall it take the primary country associated with a particular language? That would be de-DE in case of German, and for English orbother languages it would be debatable, and that would require a list of what is the primary country for each language.

avatar richard67
richard67 - comment - 26 Dec 2024

@richard67 Would it be possible to default to "Deutsch (Deutschland)", if the first language in the Accept-Language list is "de"?

That would require some kind of a hard-coded list to define the primary country (or language with country) for each language in the one or the other way (associated list or just list of preferred language-country code).

And e.g. in case of English, where in opposite to German the country with the most speakers is not the same as the country where the language comes from, it would be debatable if GB or US should be the country.

But I agree that it would be more understandable if it was either the country with the most speakers or the country where the language origins instead of just picking the first alphabetical match like de-AT in case if only de is given, or en-AU if only en is given in the header.

avatar dautrich
dautrich - comment - 26 Dec 2024

IMHO, there are two aspects:

  1. Is it technically possible (with not too much effort) to set a "default" language for those ambiguous cases (as far as I can see: Dutch, English, French, German, Portuguese)?
  2. If technically possible: Who is to decide for the default setting. The Languages Team?
avatar richard67
richard67 - comment - 26 Dec 2024

Sure it is technically possible. So 2. is the interesting question: Who decides?

avatar tecpromotion
tecpromotion - comment - 26 Dec 2024

Chrome on Mac
Image

Safari on Mac
Image

Firefox on Mac
Image

avatar richard67
richard67 - comment - 26 Dec 2024

In case of English, most software I know uses US as default because that has meanwhile become the new standard in English lessons in the world and has more speakers, as it seems. In my school days Oxford English was the standard.

But as we use en-GB as default CMS language, I would suggest to default to en-GB to be consistent with that and not to en-US, if we decide to implement a solution.

avatar richard67
richard67 - comment - 26 Dec 2024

as far as I can see: Dutch, English, French, German, Portuguese

No, that does not cover all cases. A solution should cover all possible codes available in standards, so I does not need to update it whenever a new language is added to the CMS.

For example Farsi is spoken in Iran and in Pakistan, Urdu is spoken in Pakistan and I think also in parts of Afghanistan, Hindi and Tamil are spoken not only in India, and so on.

avatar brianteeman
brianteeman - comment - 26 Dec 2024

The same mechanism works in Microsoft Edge. When I move "Deutsch (Deutschland)" to the top of the list, I get my preferred language setting:

Image

So the joomla code is working exactly as intended

avatar fgsw
fgsw - comment - 27 Dec 2024

So the joomla code is working exactly as intended

Also my opinion, so i would move this thread to "Discussions".

@richard67 If for Example "German [de]" is set as preferred Language, i suggest a "easy as possible" solution which seems the alphabetic ordering.

avatar chmst
chmst - comment - 27 Dec 2024

Other question: This affects only the installation process, nothing else.
I could not find any words in the de-AT version which I could not understand during the installation. This probably is also for other languanges (en-.. ).
So why should we make efforts here?

avatar richard67
richard67 - comment - 27 Dec 2024

Well, I'm ok with leaving it as it is. My above comments were just for the case that there is common sense to do something.

@dautrich Ok to close the issue as expected behaviour?

avatar dautrich
dautrich - comment - 27 Dec 2024

In principle, I agree to @chmst's post. However, it's a bit strange for a Joomla user to be offered a (for him) wrong locale at his very first contact with his new Joomla site.
Could we just add a note to the installation screen? Something like: “In case you're offered a wrong region setting for your language, that is caused by your browser's settings.”, together with a link to a page with some more explanations (i.e. using screenshots like above) on the Joomla site.

And @richard67: I'm okay with defining that as expected behavior. We now know the reason for this effect and how to cope with it.

avatar fgsw
fgsw - comment - 28 Dec 2024

Could we just add a note to the installation screen?

Please don't clutter the installation pages.

If you wan't add a note on Docs: Installing Joomla in the second Paragraph:

Joomla will try to identify the Select Language field automatically from your browser's language. You can change this if needed.

avatar dautrich
dautrich - comment - 28 Dec 2024

Please don't clutter the installation pages.

That obviously is a good statement from the technical point of view. But my point is about psychology: Think about a newbie at his first Joomla installation. The very first thing he/she sees may be a "wrong" locale identification. This won't increase the user's confidence in the new software. That's why I would like to have a remark on the installation page. You and I will simply ignore the message.

avatar chmst
chmst - comment - 28 Dec 2024

Why not replace the de-AT by either simple "de" or even better "German"?

avatar fgsw
fgsw - comment - 28 Dec 2024

Why not replace the de-AT by either simple "de" or even better "German"?

Good Solution cause it solves another issue too:
If a user wan't to have a site in "Portuguese" but not for a specific country he have to choose a country like "Portugal" or "Brazil" with a country flag (if he hide the country-flags Joomla shows in article "pt-PT" or "pt-BR").

avatar chmst chmst - change - 10 Jan 2025
Labels Added: Feature
avatar chmst chmst - labeled - 10 Jan 2025

Add a Comment

Login with GitHub to post a comment