Opened 4 weeks ago

Last modified 4 weeks ago

#28808 assigned New feature

Allow customizing the fallback language

Reported by: Denis Anuschewski Owned by: Claude Paroz
Component: Internationalization Version: 1.11
Severity: Normal Keywords: translation, internationalization, request
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: yes
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

This is a follow-up ticket for #28636, where I proposed changes that differ from the much better solution which came up in the analysis from Claude Paroz. So in order to clean up things the new approach with the underlying problem is now mentioned here:

Currently there is no way to explicitly specify a fallback language for both unsupported languages ( = not in settings.LANGUAGES) and missing literal translations in the translation files. This job is done by settings.LANGUAGE_CODE which controls a lot of other language-related features.

It would be useful to be able to control this behavior without touching settings.LANGUAGE_CODE which defines your project's installation-wide language preference. One scenario in which you would benefit from that is having a non-English project where you want to deliver English as fallback for languages that differ from your base language.

Change History (3)

comment:1 Changed 4 weeks ago by Denis Anuschewski

Needs documentation: set
Needs tests: set

comment:2 Changed 4 weeks ago by Denis Anuschewski

Triage Stage: UnreviewedAccepted

comment:3 Changed 4 weeks ago by Denis Anuschewski

My pull request https://github.com/django/django/pull/9248 implements this feature by introducing a new setting LANGUAGE_FALLBACK. When untouched it doesn't change the default translation routine, but by setting your desired language here you can control the translation fallback.

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