Gettext / Django(德语翻译):正式/非正式称呼 [英] Gettext/Django for german translations: formal/informal salutations

查看:114
本文介绍了Gettext / Django(德语翻译):正式/非正式称呼的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我维护了一个包含翻译的可插拔Django应用。 Python和HTML代码中的所有字符串均以英语编写。在将字符串翻译成德语时,我一直在努力解决德语区分正式演讲和非正式演讲的问题(请参阅电视区别)。由于该应用程序在从社交网络到银行网站的不同网站上使用,因此我不能仅支持正式或非正式版本。而且由于翻译的差异可能很大,所以我无法对其进行参数化。例如。句子您要注销吗?会有两种翻译:

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 fighting with the problem that German differentiates between formal and informal speech (see T–V distinction). Because the app is used on different sites, ranging from a social network to a banking website, I can't just support either the formal or informal version. And since the translations can differ quite a bit, there's no way I can parameterize it. E.g. the sentence "Do you want to log out?" would have these two translations:


  • Wollen Sie sich abmelden吗? (正式)

  • 狄斯特·迪克会不会感到震惊? (非正式)

Gettext中是否有什么可以帮助我解决这个问题?

Is there anything in Gettext that could help me with this?

推荐答案

您可以使用上下文标记为您的翻译提供更多上下文。

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?')

这篇关于Gettext / Django(德语翻译):正式/非正式称呼的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆