code: def translation_activate_block(function=None, language=None):
      
  
      def _translation_activate_block(function):
          def _decorator(*args, **kwargs):
              tmp_language = translation.get_language()
              try:
                  translation.activate(language or settings.LANGUAGE_CODE)
                  return function(*args, **kwargs)
              finally:
                  translation.activate(tmp_language)
          return wraps(function)(_decorator)
  
      if function:
          return _translation_activate_block(function)
      else:
          return _translation_activate_block
docs: Activate language only for one method or function