且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在 Django 中获取当前语言?

更新时间:2022-06-18 02:36:38

特别感兴趣的函数是 django.utils.translation.get_language(),它返回当前线程中使用的语言.请参阅文档.

Functions of particular interest are django.utils.translation.get_language() which returns the language used in the current thread. See documentation.