Opened 9 years ago

Last modified 9 years ago

#25933 closed New feature

Allow un-prefixed default language in i18n_patterns — at Initial Version

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

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 appriach. Setting it to False will turn on this "feature".

Here's the code: https://github.com/django/django/pull/5823

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top