def _i18n_cache_key_suffix(request, cache_key):
 if (settings.USE_I18N or settings.USE_L10N):
  cache_key += ('.%s' % getattr(request, 'LANGUAGE_CODE', get_language()))
 if settings.USE_TZ:
  tz_name = force_text(get_current_timezone_name(), errors='ignore')
  cache_key += ('.%s' % tz_name.encode('ascii', 'ignore').decode('ascii').replace(' ', '_'))
 return cache_key

def _i18n_cache_key_suffix ( request , cache_key ) : if ( settings . USE_I18N or settings . USE_L10N ) : cache_key += ( '.%s' % getattr ( request , 'LANGUAGE_CODE' , get_language ( ) ) ) if settings . USE_TZ : tz_name = force_text ( get_current_timezone_name ( ) , errors = 'ignore' ) cache_key += ( '.%s' % tz_name . encode ( 'ascii' , 'ignore' ) . decode ( 'ascii' ) . replace ( ' ' , '_' ) ) return cache_key
if necessary .