hoobs-org / gui

Interface component for the certified HOOBS stack.
GNU General Public License v3.0
2 stars 1 forks source link

Add Manual Language Selector #114

Closed apartmedia closed 3 years ago

apartmedia commented 3 years ago

Is your feature request related to a problem? Please describe. The Web UI can be displayed in different languages with same User (seems to be based on System or environment Variables). On Mobile (Chrome, Safari, Firefox on German iPad) I see the German UI. On MacBookPro Chrome Desktop I see the English UI (although System and Browser are set to German). In general it nice to get the default language based on the evironment, but sometimes this could not fit. So it would be worth to think about reenabling a user defined setting, to setup the preferred language independently. This was possible in HOOBS 3 and I found it useful.

Describe the solution you'd like Setting for preferred language under "Hub Settings" or under "Personalize" or under the Users Profile (if you want it based on the logged in User, but then the question is, what should be the language on the Login screen before the user is logged in).

mkellsy commented 3 years ago

I removed the language switch from the UI code because it greatly simplifies the code, while still giving users to view their desired language.

I have to think long and hard before bringing this back.

apartmedia commented 3 years ago

I removed the language switch from the UI code because it greatly simplifies the code, while still giving users to view their desired language.

I have to think long and hard before bringing this back.

So please think long and hard 😜😂

How exactly do you check for the env language? What env var is controlling this? Default browser lang in User Agent signature? I‘m wondering why my Chrome Desktop on Big Sur uses English while the system is DE and I did not manipulate headers or the signature of the user agent. If I know the type of environment value HOOBS is checking I can take a look what’s wrong configured with my browser. Anyhow, being able to switch the language manually of some sort could be helpful at some situations as the regular user might not have the ease of defining or changing the environment in a simple way.

mkellsy commented 3 years ago

It uses the language selector built into the browser. It’s not the UA it’s a variable the browser provides. This method is laid out by the ISO.

apartmedia commented 3 years ago

Strange than, that this is provided incorrectly in EN for my chrome desktop in German on a German OS 🤔

mkellsy commented 3 years ago

I will look into it

mkellsy commented 3 years ago

Some languages like German and US English have upper case letters like en-US. The case on these identifiers are all over the place, and need to be lower case. This is why other languages work.

Fixed in the next release.

apartmedia commented 3 years ago

Great that you found the reason so quickly