New option: auto-select language by HTTP header

I’m using this now on 1.4.2/3, works perfectly. Thanks a lot! :+1:

1 Like

It’s been a while. I was called to a case of Discourse not upgrading to the latest v2.4.1 and I traced it to this extension based on the error message during the upgrade attempt:

Gem::LoadError: can’t activate http_accept_language-2.0.5, already activated http_accept_language-2.1.1

… and I found this line in the repo:

gem ‘http_accept_language’, ‘2.0.5’

While I don’t know Ruby, this lead me to think there was a dependency conflict. I managed to upgrade to Discourse v2.3.10, which was successful. Then I commented out the plugin line in the container config and was able to upgrade to the latest stable of Discourse.

Now, I have not tracked the development of Discourse for a while, but recent comments led me to my first question, and if that is not the case, there is an obvious second question:

  1. Is the extension still needed, or is its functionality now covered by the Discourse “core” satisfactorily?
  2. If not, would it be possible to update the extension to make it compatible with Discourse v2.4+, and maybe even make it an “official” extension?

Thank you & all the best!

Edit: scossar/variable-language#1

1 Like

Did we regress here @david?

I don’t think this plugin is needed any more - it hasn’t been touched in years. Try using the core set locale from accept language header site setting.

@simon should we add a note to the README and archive the GitHub repo?

3 Likes

This plugin is no longer required: https://github.com/scossar/variable-language. I had actually forgotten that I made it. The plugin’s functionality has been added to core with the set locale from accept language header site setting.

I’ll remove the plugin from my Github repo and remove any references to it from Meta. Thanks for bringing this to my attention!

4 Likes