#25933 closed New feature (fixed)
Allow unprefixed default language in i18n_patterns
Reported by: | Krzysztof Urbaniak | Owned by: | nobody |
---|---|---|---|
Component: | Internationalization | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
The idea is to allow having the default language urls un-prefixed.
So adding a translations to existing site is more seamless - it does not require changing current urls, just adding new ones.
That pattern with un-prefixed default language is pretty common - for example https://www.apple.com (which is en_US) and https://www.apple.com/fr/ (fr_FR).
Any other language than the default one is prefixed as before using i18n_patterns.
The idea for that is having a prefix_default_language
param to i18n_patterns
, which is True
by default, to keep it compatible with current approach. Setting it to False
will turn on this "feature".
Here's the code: https://github.com/django/django/pull/5823
Change History (7)
comment:1 by , 9 years ago
Description: | modified (diff) |
---|---|
Summary: | Allow un-prefixed default language in i18n_patterns → Allow unprefixed default language in i18n_patterns |
Type: | Uncategorized → New feature |
comment:2 by , 9 years ago
comment:3 by , 9 years ago
Has patch: | set |
---|---|
Needs documentation: | set |
Needs tests: | set |
Triage Stage: | Unreviewed → Accepted |
comment:4 by , 9 years ago
Needs documentation: | unset |
---|---|
Needs tests: | unset |
comment:5 by , 9 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
Claude, does this proposal look reasonable?