我想知道是否有办法在渲染日期时更改日期的语言(与更改格式相同的方法:{{mydate|date:"d FY - H:i"}})。
我查看了文档:https ://docs.djangoproject.com/en/dev/ref/templates/builtins/?from=olddocs#date 但我什么也没找到。
谢谢您的帮助。
You could change the locale before rendering it as a string. Then change it back after. Although, I'm not sure why you want to have a date in a language different from your other output. Maybe explain what you are trying to accomplish with this, first. There is no built-in way to do it simply formatting the date.