Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store interface language for users #116

Closed
tsauerwein opened this issue Dec 22, 2015 · 5 comments
Closed

Store interface language for users #116

tsauerwein opened this issue Dec 22, 2015 · 5 comments

Comments

@tsauerwein
Copy link
Member

A user should be able to set their preferred interface language which is stored in the database and used every time they access the site.

@gberaudo
Copy link
Contributor

This could be done this way:

  • during registration, read the current language of the UI and send it together with other info;
  • store it in user table;
  • use it for sending emails...
  • each time the user change the language a request is sent to the API to update the state.

@tsauerwein
Copy link
Member Author

And:

  • when logging in, the language is sent to the UI so that the interface language can be set accordingly.

@asaunier
Copy link
Member

Could this "user prefered language" attribute be used to serve documents when the language is not specified?
For instance in v5, there are links such as http://www.camptocamp.org/summits/37355 that will redirect to http://www.camptocamp.org/summits/37355/fr/mont-blanc depending on the available locales, the UI interface language or some priority list of languages.

Of course for anonymous users we would not have such a "user prefered language" attribute and should use a default lang.

@tsauerwein
Copy link
Member Author

On the ui server side you usually do not have the authentication token (only when doing xhr requests where the token is explicitly set in the headers).

But the current interface language is stored in a cookie, which is already used for list views, see c2corg/v6_ui#73.

@asaunier
Copy link
Member

Can we close this issue @gberaudo ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants