Django Internationalization override translation mechanisim not working as expected
|Reported by:||alfredo||Owned by:||jezdez|
|Severity:||Keywords:||internationalization translation overrride not-working|
|Cc:||alfredo@…, michal@…||Triage Stage:||Accepted|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Description (last modified by ramiro)
The internationalization override is not working as expected
The documentation says:
you can write applications that include their own translations, and you can override base translations in your project path. Or, you can just build a big project out of several apps and put all translations into one big project message file. The choice is yours.
Which makes perfect sense to have distributable apps and be able to override such translations provided with the app
But having a distributable app with its translation, living outside the project path, lets say:
And trying to override such translation with:
It will pick up the translation from the app ignoring the one in the project path.
Looking at the code I can see that the translation on the project path gets to be called first
and then the translations on the external apps which overrides the translations already picked up in the project path.
It looks like the answer would be to load first the translation of the apps and then the translations in the project path. I've tried switching them and it worked for me.
Change History (8)
comment:1 Changed 7 years ago by garcia_marc
- Needs documentation unset
- Needs tests unset
- Owner changed from nobody to garcia_marc
- Patch needs improvement unset
comment:6 Changed 6 years ago by jezdez
- Owner changed from garcia_marc to jezdez
- Status changed from new to assigned
comment:7 Changed 6 years ago by jezdez
- Resolution set to fixed
- Status changed from assigned to closed