I need to load different translations in one site. Exact language for translations is the same, but there are differences between messages. Structure of locale looks like that:
./locale |-- en | `-- LC_MESSAGES | |-- django.mo | |-- django.po | `-- django.po~ |-- en_gb_rentals | `-- LC_MESSAGES | |-- django.mo | |-- django.po | `-- django.po~ |-- en_gb_trucks | `-- LC_MESSAGES | |-- django.mo | |-- django.po | `-- django.po~ |-- pl | `-- LC_MESSAGES | |-- django.mo | |-- django.po | `-- django.po~ |-- pl_pl_rentals | `-- LC_MESSAGES | |-- django.mo | |-- django.po | `-- django.po~ `-- pl_pl_trucks `-- LC_MESSAGES |-- django.mo |-- django.po `-- django.po~ This is the middleware I use: def process_request(self, request): language = 'en_gb' # it will be changed dynamically language_ex = language + '_' + request.site.name # it is generated in another middleware and depends on url translation.activate(language_ex) request.LANGUAGE_CODE = translation.get_language() def process_response(self, request, response): patch_vary_headers(response, ('Accept-Language',)) response['Content-Language'] = translation.get_language() translation.deactivate() return response Translations are loaded properly, but only at first time after restarting server. request.site.name and request.LANGUAGE_CODE ale changing but translation is not changing (except after first request per exact url). Is the way to load different translation when server is running? --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---