Django Book 翻译
菜单>:
TOC
返回
原文:
If you define a custom ``LANGUAGES`` , its OK to mark the languages as translation strings but use a dummy ``gettext()`` function, not the one in ``django.utils.translation`` . You should *never* import ``django.utils.translation`` from within your settings file, because that module itself depends on the settings, and that would cause a circular import.
翻译:
如果自定义了 ``LANGUAGES`` ,将语言标记为翻译字符串是可以的,但是,请不要使用 ``django.utils.translation`` 中的 ``gettext()`` (决不要在settings文件中导入 ``django.utils.translation`` ,因为这个模块本身是依赖于settings,这样做会导致无限循环),而是使用一个“虚构的” ``gettext()`` 。
备注:
译者: