> Great, but I want to have globally accessible language code (i.e. to
> select news based on current language), so I added method to get
> language to your Translation object and a helper function
> get_language to get current language. Also I added LANGUAGE_CODE and
> LANGUAGES to DjangoContext so templates can have access to list of
> available languages (from config) and currently selected language. I
> can write tag for that, but this way is more general (IMO).

I am adding it to my branch. I did provide a default LANGUAGES
definition in the global settings that lists all languages that are
already available - the idea being that users can just take that list
and show it to their users, or extend it with local languages they
provided.

I did change the LANGUAGE_CODE stuff for the DjangoContext a bit,
because LANGUAGE_CODE is only defined on the request if you have the
i18n middleware loaded - now the DjangoContext either carries
request.LANGUAGE_CODE or settings.LANGUAGE_CODE.

Commit will follow soon, I need to take a few tests, first.

Thanks for your input (and more thanks that you don't feel put off
because I did the patch a bit different than your first patch ;) )

bye, Georg

Reply via email to