server icon indicating copy to clipboard operation
server copied to clipboard

Option to force a specific language

Open Dreadeath opened this issue 9 years ago • 19 comments

In NC11 default_language in config.php is ignored, right? In NC10 all was fine.

Also I can't find settings/languageCodes.php file according to this.

Dreadeath avatar Dec 15 '16 04:12 Dreadeath

@MorrisJobke you killed the file, any idea how to do the docs now?

The default language is only used when the brower does not send a language. This was changed in 11, so now the "default" is a default instead of a "force"

nickvergessen avatar Dec 15 '16 14:12 nickvergessen

This was changed in 11, so now the "default" is a default instead of a "force"

Is there a simple way to bring back "force" behavior? Maybe new feature like force_language?

Dreadeath avatar Dec 15 '16 15:12 Dreadeath

Not atm, why would you like users to get a different language then what they want to read?

nickvergessen avatar Dec 15 '16 16:12 nickvergessen

Because "what they want to read" is not always equals to "how their browser is set up", especially when there is a group of (very) non-technical users that you definitely know speaks one language.

Dreadeath avatar Dec 15 '16 16:12 Dreadeath

The thing is we can't see the difference. So assume userA sets up their browser to their proper locale and then gets the website served in a different language. This is just weird and confusing.

If a user wants a different language they can always switch in the user settings. I mean if people can read their whole interface in language X they can probably also find the settings.

rullzer avatar Dec 16 '16 07:12 rullzer

If user can set browser to use one language, he is also able to find NC settings to change it once and forever.

But if non-technical user (e.g. your grandma) see wrong language for whatever reason, you do not want him to call you and annoy that "WTF, you break it all".

I know that all of my private NC instance users speaks one language. I don't need even theoretical possibility that language will change somehow for them. I know maybe it is not right for default behavior, but there are situations like mine where it can save you time and nerves ;)

Dreadeath avatar Dec 17 '16 16:12 Dreadeath

This still works on the old cloud...

Was changed in https://github.com/nextcloud/server/pull/1259

Would it make sense to have something like a "force language" option, which then always uses default-lang, not allowing to change the language in the personal settings? That is what @schiessle and me came up with as a best solution.

nickvergessen avatar Dec 19 '16 10:12 nickvergessen

Also I my browser shows: "de, en-US, en", I killed the preference, but still get english. All requests have the accept-language header set to en-US,en;q=0.5. So I get english, although my browser should tell german?

Okay seems like this is a bug in firefox, I just moved de down and up again and now it sends de,en-US;q=0.7,en;q=0.3 correctly

nickvergessen avatar Dec 19 '16 10:12 nickvergessen

I don't know if not letting people to change language is best solution, but it would be better than nothing.

Also, I got this Firefox bug too.

Dreadeath avatar Dec 20 '16 21:12 Dreadeath

@Dreadeath, I was behind the bug #970 that resulted in this changing. I'd like to understand what is the real world issue the change might have caused.

Do you have some browser that defaults Accept-Language header to some other language from the user interface of the browser? Could you be more specific what browser is being used? What is the UI language, what is the Accept-Language header? How come the Accept-Language is something the user does not understand?

kohtala avatar Mar 16 '17 11:03 kohtala

Hi,

I'd like to have de_DE as default for my users (the formal style), but now in NC11 "de" is selected as default (informal). Off course I set default_language = de_DE in config.php How can I force this now?

MichaRivera avatar May 11 '17 09:05 MichaRivera

Nextcloud 12 also suffers from this. Is there any workaround or plans for upcoming release in NC12?

frilancer avatar Jun 08 '17 09:06 frilancer

@frilancer, could you be more specific what you are experiencing? Is it like @MichaRivera, who wants to select certain sublanguage of de?

Or would you like to force for example user having Finnish language browser to see German NextCloud interface?

I'm thinking if your requirement would be better satisfied by having a language mapping rather than implement force_language to force all users to some specific language regardless of the language of their browser. I think there is some danger in forcing users to a language that they might not be fluent in.

kohtala avatar Jun 08 '17 13:06 kohtala

@kohtala, I don't want to force language on users but I do want start of week day to be Monday not Sunday and 24h time format for calendar app, so if having to force it upon them, though. ;-P

Idealy I would like to see an option for users to choose language and region. For instance, I like my NC to be in English (prefferably in en_GB) but I would like NC to honor my regional settings (I'm from Slovenia, so 24h time format, Monday is the first day of the week,...).

In previous versions my workaround was to use English (UK), since they also use 24h time format and they start a week on Monday, but since NC12 I can't choose any other English than US.

frilancer avatar Jun 08 '17 13:06 frilancer

@frilancer this was mentioned many times in Calendar app issue tracker. There is a plan to allow custom regional settings.

However, I can confirm that the English (UK) language setting - which solved the problem with a workaround - disappeared in NC12. Why is it so? In Transifex, it seems to be 100% translated, so it shouldn't be a problem... I guess we have to wait for next point release?

pixelipo avatar Jun 08 '17 14:06 pixelipo

Feel free to test https://github.com/nextcloud/server/issues/5498

nickvergessen avatar Jun 21 '17 09:06 nickvergessen

I just installed nextcloud 21 and added default_language as shown here in my config.php then restart the container (docker) and then do my first login with admin and/or another user but english still their default language.

here a part of my config file

  'default_locale' => 'fr_FR',
  'default_language' => 'fr',
  'default_phone_region' => 'FR',

so what I'm missing ???

JOduMonT avatar Jan 09 '22 02:01 JOduMonT

Either you use force_language or you manually change the language of existing users

nickvergessen avatar Jan 09 '22 07:01 nickvergessen

@JOduMonT , do you know what Accept-Language header the browser sends? If the browser tells the user locale is English, then default_language is not used. The Accept-Language should be the user interface language of the browser, but it is configurable.

kohtala avatar Jan 18 '22 06:01 kohtala