Opened 14 years ago

Closed 14 years ago

Last modified 11 years ago

#14461 closed (fixed)

Allow to use other translation languages than just the ones available in Django

Reported by: diegobz Owned by: nobody
Component: Internationalization Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: yes
Needs tests: yes Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

Django doen't allow to activate a language available in a project, but that it is not present in the django/conf/locale/.

I've noticed it's because of the check_for_language function.

Not sure if it's the best way to fix it, but I'm providing a patch that can resolve the issue.

Attachments (1)

accept_more_langs.diff (907 bytes ) - added by diegobz 14 years ago.

Download all attachments as: .zip

Change History (10)

by diegobz, 14 years ago

Attachment: accept_more_langs.diff added

comment:1 by diegobz, 14 years ago

Summary: Accept to use more languages than just the ones available in DjangoAllow to use other translation languages than just the ones available in Django

comment:2 by Ramiro Morales, 14 years ago

Resolution: wontfix
Status: newclosed

I know this is a design decision, and has been like this for a long time. This ticket certainly made me ask myself what would be the reason for such a decision. Fortunately the answer is in the docs: http://docs.djangoproject.com/en/1.2/topics/i18n/localization/#how-to-create-language-files (Locale restrictions box).

I will close the ticket for now. Were a patch like this to be accepted it would need to update the documentation and add tests. Also, it seems to me it need to deal with updating the LANGUAGES setting esomehow because adding the translation path to the path search list isn't enough.

Version 0, edited 14 years ago by Ramiro Morales (next)

comment:3 by Ramiro Morales, 14 years ago

Resolution: wontfix
Status: closedreopened

After further discussion with Jannis on IRC, actually this could be an old restriction that might be worth reviewing and possibly removing provided no existing behavior is affected and all the necessary pieces of the user locale language preferences selection are modified accordingly so the translations added using this mechanism are effectively made available.

comment:4 by Ramiro Morales, 14 years ago

#14530 was about the documentation side of this issue. It was closed in favor of a complete (including documentation fixes) solution to this ticket.

comment:5 by Ramiro Morales, 14 years ago

Needs documentation: set
Needs tests: set
Patch needs improvement: set

comment:6 by rasca, 14 years ago

Triage Stage: UnreviewedAccepted

Accepting it after talking to ramiro in IRC.

comment:7 by Jannis Leidel, 14 years ago

Resolution: fixed
Status: reopenedclosed

In [15507]:

Fixed #14461 -- Look also in LOCALE_PATHS when checking if a language is supported. Thanks to Diego Búrigo for the initial patch.

comment:8 by Claude Paroz <claude@…>, 11 years ago

In b780d03d624e712d7b1f6b6796058b950e975675:

Removed obsolete locale restriction admonition

Refs #14461. Thanks Ramiro Morales for pointing this.

comment:9 by Claude Paroz <claude@…>, 11 years ago

In 3c8879f092be25f0b60051d8e0c3a77dca354af3:

[1.6.x] Removed obsolete locale restriction admonition

Refs #14461. Thanks Ramiro Morales for pointing this.
Backport of b780d03d62 from master.

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