#12848: language names should be kept native
-------------------------------------------+--------------------------------
Reporter: daonb | Owner: nobody
Status: closed | Milestone: 1.2
Component: Internationalization | Version: 1.2-alpha
Resolution: duplicate | Keywords:
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
-------------------------------------------+--------------------------------
Changes (by ramiro):
* status: new => closed
* resolution: => duplicate
Old description:
> the LANGUAGES settings array holds tuples of language code and language
> name. This array is used in templates for language selection. By default,
> language names are not translated. The docs show a sample of how to
> translate the names into the current locale:
>
> {{{
> gettext = lambda s: s
>
> LANGUAGES = (
> ('de', gettext('German')),
> ('en', gettext('English')),
> )
> }}}
>
> Which I think is wrong. If the locale is Chinese, I won't be able to
> choose between Hebrew and Russian.
> The attached patch chages the i18n context process so it translats every
> language name to its native language. I couldn't think of a way to test
> it so I added a new view to the [http://127.0.0.1:8000/hello/i18n/
> example site].
New description:
the LANGUAGES settings array holds tuples of language code and language
name. This array is used in templates for language selection. By default,
language names are not translated. The docs show a sample of how to
translate the names into the current locale:
{{{
gettext = lambda s: s
LANGUAGES = (
('de', gettext('German')),
('en', gettext('English')),
)
}}}
Which I think is wrong. If the locale is Chinese, I won't be able to
choose between Hebrew and Russian.
The attached patch chages the i18n context process so it translats every
language name to its native language. I couldn't think of a way to test it
so I added a new view to the [http://127.0.0.1:8000/hello/i18n/ example
site].
[[BR]]
Comment:
Duplicate of #4030, the patch attached there implements a more holistic
solution.
--
Ticket URL: <http://code.djangoproject.com/ticket/12848#comment:3>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.