-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
[feature] Add user preferred language field #261
Labels
Comments
I think this can be closed for now as it's not really needed. |
codesankalp
added a commit
that referenced
this issue
Nov 15, 2021
codesankalp
added a commit
that referenced
this issue
Nov 15, 2021
codesankalp
added a commit
to codesankalp/openwisp-users
that referenced
this issue
Nov 18, 2021
nemesifier
added a commit
that referenced
this issue
Nov 26, 2021
Closes #261 Co-authored-by: Federico Capoano <f.capoano@openwisp.io>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We need to store an additional field to store the preferred language of the user (string, with choices defaulting to
settings.LANGUAGES
, defaulting to a callable which uses the default locale set in django settings).This is needed because in different modules we send email to users and in some end-user applications we need to translate the content for the end users, and when sending email we don't have HTTP requests which tell us which languages are accepted by the user so we need to have this info stored in the DB.
Something like the following should do:
Let's ensure the migration created points the choices directly to
settings.LANGUAGES
without duplicating the whole list/tuple, otherwise it will be painful to maintain.The text was updated successfully, but these errors were encountered: