Changes between Initial Version and Version 2 of Ticket #28636
- Timestamp:
- Sep 28, 2017, 3:58:09 AM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #28636
- Property Component Utilities → Internationalization
- Property Keywords internationalization added; locale removed
-
Ticket #28636 – Description
initial v2 1 **Problem**: In the current state, the user's discovered language preference is only returned when found in `settings.LANGUAGES`. That's more than sufficient for the normal translation routine, but there seems to be no way (at least no DRY way) to find out a user's localepreference REGARDLESS of `settings.LANGUAGES`.1 **Problem**: In the current state, the user's discovered language preference is only returned when found in `settings.LANGUAGES`. That's more than sufficient for the normal translation routine, but there seems to be no way (at least no DRY way) to find out a user's preference REGARDLESS of `settings.LANGUAGES`. 2 2 3 **Suggestion**: It would be nice to have an easy way for finding out a languange preference from request, even if it's not listed in your supported languages. You could think of an optional flag, so that the preference from `get_language_from_request` is checked against `LANG_INFO` in the translation module rather than only against `settings.LANGUAGES`. This would give you a locale from all languages that are availablein the translation module. You could use that e.g. for comparing with `settings.LANGUAGE_CODE` and add a fallback for specific cases.3 **Suggestion**: It would be nice to have an easy way for finding out a languange preference from request, even if it's not listed in your supported languages. You could think of an optional flag, so that the preference from `get_language_from_request` is checked against `LANG_INFO` in the translation module rather than against `settings.LANGUAGES`. This would give you one of all available languages in the translation module. You could use that e.g. for comparing with `settings.LANGUAGE_CODE` and add a fallback for specific cases.