diaspora / diaspora-project-site

Code for the Diaspora project site.
https://diasporafoundation.org/
Other
48 stars 41 forks source link

diasporafoundation.org language should follow browsers acceptLanguage header #130

Closed ThorstenClaus closed 5 years ago

ThorstenClaus commented 5 years ago

The main project site 'https://diasporafoundation.org' has several localizations. Todays browser are sending a AcceptLanguage Header that seems not to be evaluated.

A user should see by default the page (every diaspora page) in the suggested language sent by the browser with a fallback to English.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/70063536-diasporafoundation-org-language-should-follow-browsers-acceptlanguage-header?utm_campaign=plugin&utm_content=tracker%2F522&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F522&utm_medium=issues&utm_source=github).
denschub commented 5 years ago

Unless you have a locale cookie, which you will get for manually changing the language, the project site does exactly that.

# curl -s -H "Accept-Language: en" https://diasporafoundation.org/ | grep "<title"
  <title>The diaspora* Project</title>

# curl -s -H "Accept-Language: de" https://diasporafoundation.org/ | grep "<title"
  <title>Das Projekt diaspora*</title>
ThorstenClaus commented 5 years ago

👍🏻 Nice- thank you. That works.