2007/10/18, AniNair <anitnair gmail.com>:
>
> Hi...
> I am trying inernationalization.
> {% for lang in LANGUAGES %}
> <option value="{{ lang.0}}" >{{ lang.1
}}</option>
> {% endfor %}
> This lists all the languages in the settings.py .
>
> Can someone tell me how to get the current language
being used in the
> template? I managed to pass it from my view. but is
there some way to
> get this from the template?
> I tried {% load i18n %}
> {% get_current_language as LANGUAGE_CODE %} This gives
the code.
> please advice
Just use it, {} as the tag just gets the
language, or
perhaps I'm missing something...
--
Antoni Aloy López
Binissalem - Mallorca
http://www.trespams.com
Soci de Bulma - http://www.bulma.cat
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-users googlegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribe googlegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|