Changes between Initial Version and Version 1 of Ticket #34455, comment 16


Ignore:
Timestamp:
Apr 6, 2023, 11:41:53 AM (15 months ago)
Author:
Mohit Singh Sinsniwal

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #34455, comment 16

    initial v1  
    66get_faalback_language is taking the prefixed language. If we dont want that, then we can update the process_request function:
    77OLD:
    8     def process_request(self, request):
     8
     9{{{
     10def process_request(self, request):
    911        urlconf = getattr(request, "urlconf", settings.ROOT_URLCONF)
    1012        i18n_patterns_used, _ = is_language_prefix_patterns_used(urlconf)
     
    1820        request.LANGUAGE_CODE = translation.get_language()
    1921
     22}}}
     23
     24   
    2025New:
     26{{{
    2127    def process_request(self, request):
    2228        urlconf = getattr(request, "urlconf", settings.ROOT_URLCONF)
     
    3743        translation.activate(language)
    3844        request.LANGUAGE_CODE = translation.get_language()
    39 
     45}}}
    4046I want to work on this issue and need your suggestion if I am on right track.
    4147
Back to Top