mozilla/playdoh — Issue #81: Upstream kitsune LocaleURLMiddleware/supporting tools
Author: jsocol
Created: 2011-10-27 21:35:48+00:00
State: open
Labels: L10n

Kitsune's `LocaleURLMiddleware` is slightly more advanced than what Playdoh has--which may be a very old version of ours. The key difference is two kwargs for `reverse()` that are very useful for testing, `locale` and `force_locale`. (Unlike `prefix` this allows you to actually set the locale.)

These are useful both in tests, and if you have UI that links to non-localized parts of the site, and you want to force the locale to be `en-US` (or something).

I'm also considering just pulling these bits into their own small package, since there's a bunch of infra. Then we could include it in Playdoh and actually share with Kitsune/Kuma/etc.