开发者

How to resolve case problems for non-english languages in django admin panel?

开发者 https://www.devze.com 2022-12-18 10:04 出处:网络
I need to resolve problem with word endings in django admin panel. The language I\'m using is russian (using utf-8 charset), so some problems occur, for example, there is a problem with the right endi

I need to resolve problem with word endings in django admin panel. The language I'm using is russian (using utf-8 charset), so some problems occur, for example, there is a problem with the right endings on the "Add" button for some model names. The simplest thing I found is using jQuery to correct endings "on the fly", but this solution is t开发者_如何学JAVAoo radical. Maybe there is a simple answer? Just don't want to dig again into deepness of django's sources...


If I understood the problem correctly, you should just add an appropriate attribute in the meta section of the class.
English example:

class Man(models.Model):
    [...your fields...]

    class Meta:
        verbose_name_plural = "men"

More info can be found in the documentation for Django model options

0

精彩评论

暂无评论...
验证码 换一张
取 消