Opened 3 years ago

Closed 3 years ago

#28808 closed New feature (duplicate)

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: Unreviewed
Has patch: yes Needs documentation: yes
Needs tests: yes Patch needs improvement: no
Easy pickings: no UI/UX: no


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 (5)

comment:1 Changed 3 years ago by Denis Anuschewski

Needs documentation: set
Needs tests: set

comment:2 Changed 3 years ago by Denis Anuschewski

Triage Stage: UnreviewedAccepted

comment:3 Changed 3 years ago by Denis Anuschewski

My pull request 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.

comment:4 Changed 3 years ago by Ramiro Morales

Has patch: set
Triage Stage: AcceptedUnreviewed

comment:5 Changed 3 years ago by Carlton Gibson

Resolution: duplicate
Status: assignedclosed

I'm going to close this as a duplicate of #28636. Better to keep all the discussion in the one place there.

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