重写一哈 以获得request.LANGUAGE_CODE @register.simple_tag(takes_context=True) def get_language(context): return context.request.LANGUAGE_CODE.lower() 小小建议