django translation template {% trans “something” %}

前端 未结 4 1592
你的背包
你的背包 2021-01-05 00:29

Ok I have been searching like crazy for this I think simple problem.

I use Django 1.4

The problem is that django won\'t translate a simple {% trans \"work\"

4条回答
  •  暖寄归人
    2021-01-05 01:14

    I just spent few hours trying to fix this issue in Django 1.5 while working on my new project Sportolio and it turned out I was missing a comma at the end of LOCALE_PATH

    LOCALE_PATHS = (
        '/path/to/my/project/locale/',
    )
    

    This is very crucial, as Django expects LOCALE_PATHS to be a TUPLE not a String.

    I hope it save someone's life :)

提交回复
热议问题