def _get_request_locale(request):
 locale = request.LANGUAGE_CODE
 if (not localedata.exists(locale)):
  locale = settings.LANGUAGE_CODE
 return locale

def _get_request_locale ( request ) : locale = request . LANGUAGE_CODE if ( not localedata . exists ( locale ) ) : locale = settings . LANGUAGE_CODE return locale
return locale from the request .