Project

General

Profile

Actions

Feature #2691

closed

Option to disable automated language-guessing based on HTTP_ACCEPT_LANGUAGE HTTP-header

Added by Mischa The Evil almost 16 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Normal
Category:
UI
Target version:
Start date:
2009-02-07
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

This is a patch to make it possible to disable Redmine's default behaviour of using automated language-guessing based on the HTTP_ACCEPT_LANGUAGE HTTP-header.

This is again a patch based on the implementation of this feature by the Typo3-Forge team. You can find it here. I only made it a configurable setting through Redmine -> Administration -> Settings > Display. The default value is to use automated language-guessing based on the HTTP_ACCEPT_LANGUAGE HTTP-header, thus default behaviour isn't changed by default.


Files

option_to_disable_language_guessing-r2383.patch (3.38 KB) option_to_disable_language_guessing-r2383.patch Patch created against trunk@r2383. Mischa The Evil, 2009-02-07 00:28
0001-Redmine-default-locale-used-before-browser-locale-en.patch (2.23 KB) 0001-Redmine-default-locale-used-before-browser-locale-en.patch First part Thomas Lecavelier, 2009-12-18 12:22
0002-Add-option-to-force-default-language-for-non-logged-.patch (23.5 KB) 0002-Add-option-to-force-default-language-for-non-logged-.patch Last part (with the option and remove the blank default language) Thomas Lecavelier, 2009-12-18 12:22

Related issues

Has duplicate Redmine - Defect #4311: Settings default language not (really) usedClosed2009-11-30

Actions
Has duplicate Redmine - Feature #12112: Forcing locale (language) on a projectClosed

Actions
Actions #1

Updated by Jean-Philippe Lang almost 16 years ago

Actually, it seems to do more than disabling the detection of the browser's language.

It also ignores the language that the user have chosen on its account. If it's the desired behaviour, we should either hide the 'Language' preference field on 'My account' or have a separate setting to allow/disallow registered users to choose a different language.

Actions #2

Updated by Mischa The Evil over 15 years ago

Jean-Philippe Lang wrote:

Actually, it seems to do more than disabling the detection of the browser's language.

Indeed, you are correct... :)

It also ignores the language that the user have chosen on its account. If it's the desired behaviour, we should either hide the 'Language' preference field on 'My account' or have a separate setting to allow/disallow registered users to choose a different language.

My initial intention was to completely disable the buildin internationalisation to be able to configure a language as being 100% static...

In that light I'd say we go for the separate setting to allow/disallow registered users to choose a different language with the extension that if the setting is disallowed no automated language-guessing, based on HTTP_ACCEPT_LANGUAGE HTTP-header, is applied.
This seems to me the most logical solution instead of having two dedicated settings like:
  1. allow/disallow registered users to choose a different language
  2. enable/disable automated language-guessing based on HTTP_ACCEPT_LANGUAGE HTTP-header

What do you think?

Actions #3

Updated by Harri H over 15 years ago

Mischa The Evil wrote:

In that light I'd say we go for the separate setting to allow/disallow registered users to choose a different language with the extension that if the setting is disallowed no automated language-guessing, based on HTTP_ACCEPT_LANGUAGE HTTP-header, is applied.
This seems to me the most logical solution instead of having two dedicated settings like:
  1. allow/disallow registered users to choose a different language
  2. enable/disable automated language-guessing based on HTTP_ACCEPT_LANGUAGE HTTP-header

What do you think?

Well, I'm not Jean-Philippe but could throw out some ideas related to this. It seems to me that your patch isn't in the trunk yet so I assume this issue is still open.

The reason I started looking at this language issue more closely is that when arriving to Redmine home for the first time (as a non-registered user), UI was in Finnish for me. Uh. Somebody might like it, but I don't. And there was no way to change the language (without registering and logging in). Not very nice, if I may say. If there's something like UI language selection happening automatically user should be able to change it when necessary - let's try not to mimic behaviour of our friend Windows and try to be "smart" and "know" what the user wants without providing means to influence the decision (easily).

Anyway, I would suggest that also a non-registered user could be able to change the UI language. For example, a dropdown box with 'Set' button to upper right corner and the selected language could be saved to cookies/session. And, of course, if the current user decides to register, this selected language could be selected automatically in the language selection dropdown, meaning the user doesn't have to touch the language setting (ever) again. The automatic language sniffing could be as it is now, users could just change the language on the rare case they don't like the one system chose.

Does this make any sense, any thoughts?

And yes, I'm new to this project, so if there has been discussion on this topic elsewhere, please forgive me.

Actions #4

Updated by Mischa The Evil over 15 years ago

Harri H wrote:

The reason I started looking at this language issue more closely is that when arriving to Redmine home for the first time (as a non-registered user), UI was in Finnish for me. Uh. Somebody might like it, but I don't. And there was no way to change the language (without registering and logging in). Not very nice, if I may say.

Good point you mention there which IMHO should definately has to be taken into consideration within this issues scope.

Regards,

Mischa.

Actions #5

Updated by Thomas Lecavelier almost 15 years ago

Here an escape from #4311.

I repost my first patch, adapted to current trunk, with a second one giving an option to force usage of the Setting.default_language over the HTTP_ACCEPT_LANGUAGE.

Hoping this help.

Actions #6

Updated by Mischa The Evil almost 14 years ago

Thomas Lecavelier wrote:

Here an escape from #4311.

I repost my first patch, adapted to current trunk, with a second one giving an option to force usage of the Setting.default_language over the HTTP_ACCEPT_LANGUAGE.

Hoping this help.

Thomas,

This "escape" will do it for me. Thanks for sharing. Hope they'll make it into the core.

Mischa.

Actions #7

Updated by Ebrahim Mohammadi almost 11 years ago

I miss this option severly. No recent development? Not available as a plugin?

Actions #8

Updated by Jean-Philippe Lang almost 11 years ago

  • Tracker changed from Patch to Feature
  • Category changed from Administration to UI
  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Target version set to 2.5.0
  • Resolution set to Fixed

r12692 adds 2 new settings that let force the default language for anonymous and/or logged-in users.

Actions #9

Updated by Go MAEDA over 8 years ago

  • Has duplicate Feature #12112: Forcing locale (language) on a project added
Actions

Also available in: Atom PDF