-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add i18n support #76
Comments
i18n is supported by django and should be used in the WAM. The required middleware was enabled in #80. |
Hi all, we implemented i18n in stemp_abw and it works. But there seems to be a drawback. We have to define a default language via the constant LANGUAGE_CODE, which lives in wam.settings. We define this constant in our app specific settings.py (see this commit: rl-institut/WAM_APP_stemp_abw@da72dd9), which is imported as global project setting for all apps by a routine in wam/settings.py (https://github.com/rl-institut/WAM/blob/dev/wam/settings.py#L184-L206). The problem I have with this solution is, that:
Has anyone an idea how to fix this? This problem occurs, because we don't use a Django project base (WAM) for every app, instead we try to share one WAM with all apps (IMO we use Django differently as intended). I assigned the whole dev team to this issue, because I also want to take this issue as opportunity to talk about our strategy in general (shared Django project base vs Django project base for each app). Maybe in another issue or in a short meeting. What do you think? |
#74 seems to be a good place |
Yes, this is a critical problem indeed. A major restructuring as you proposed is a clean solution but this raises heaps of other questions and, most important, we would need a lot of time...
a) Instead of setting a default language in the app-specific settings.py, we agree on a WAM-wide default language (DE or EN) which must be supported by all(!) apps. (the setting of the default language in an app should be omitted automatically)
b) Wait, I thought if the app does not support the current language set in your session/cookie, it falls back to default?! If so, it should be enough to set the WAM-wide default language, right? What I don't know is whether the fallback in b) resets the language code in your cookie. Yes, no? What do you think? By the way, this is related to the interference of app settings in general #74 |
as it's now set in WAM settings, cf. rl-institut/WAM#76
@4lm, we decided for 'de-DE' as default language, as u can see in the commits above I adjusted WAM & StEmp ABW accordingly. Seems to work 👍. EDIT: See also: rl-institut/WAM_APP_stemp_abw#72 (comment) |
Ok, i18n is working now. |
We should look for solution to separate the languages in a clean way. This issue is not urgent.
The text was updated successfully, but these errors were encountered: