Opened 7 years ago

Closed 6 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

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

comment:1 by Denis Anuschewski, 7 years ago

Needs documentation: set
Needs tests: set

comment:2 by Denis Anuschewski, 7 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Denis Anuschewski, 7 years ago

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.

comment:4 by Ramiro Morales, 6 years ago

Has patch: set
Triage Stage: AcceptedUnreviewed

comment:5 by Carlton Gibson, 6 years ago

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