Gettext/Django for german translations: formal/informal salutations

后端 未结 2 1040
借酒劲吻你
借酒劲吻你 2021-01-22 01:16

I maintain a pluggable Django app that contains translations. All strings in Python and HTML code are written in English. When translating the strings to German, I\'m always fig

2条回答
  •  暖寄归人
    2021-01-22 01:28

    You can use contextual markers to give your translations additional context.

    logout = pgettext('casual', 'Do you want to log out?')
    

    ...

    logout = pgettext('formal', 'Do you want to log out?')
    

提交回复
热议问题