Django: default language i18n

后端 未结 3 1492
耶瑟儿~
耶瑟儿~ 2021-02-07 05:45

I have a website that is written in dutch. Now I have to provide a second language for that website which is french.

So I surrounded all text that needs to be translate

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-07 06:16

    If you use {% url web-language 'nl-nl' %} like this 'nl-nl' is in your args (args[0]), not in your kwargs. For kwargs you should use syntax like {% url web-language language='nl-nl' %}. Then your view should work. Hopefully your urlconf matches the way the view is dealing with it.

提交回复
热议问题