Exemplo n.º 1
0
def i18n(request):
    from google.appengine._internal.django.utils import translation

    context_extras = {}
    context_extras['LANGUAGES'] = settings.LANGUAGES
    context_extras['LANGUAGE_CODE'] = translation.get_language()
    context_extras['LANGUAGE_BIDI'] = translation.get_language_bidi()

    return context_extras
Exemplo n.º 2
0
def i18n(request):
    from google.appengine._internal.django.utils import translation

    context_extras = {}
    context_extras['LANGUAGES'] = settings.LANGUAGES
    context_extras['LANGUAGE_CODE'] = translation.get_language()
    context_extras['LANGUAGE_BIDI'] = translation.get_language_bidi()

    return context_extras
Exemplo n.º 3
0
 def render(self, context):
     context[self.variable] = translation.get_language_bidi()
     return ''