我们目前正在实施一个 Zend 框架项目,需要翻译成 6 种不同的语言。我们已经有了一个非常复杂的翻译系统,它基于 Zend_Translate,它还处理翻译键中的变量。
我们的项目有一个新的土耳其语翻译,我们面临一个新问题:语法,尤其是土耳其语。我注意到这个问题可能在每个翻译系统和大多数语言中都很明显,所以我在这里发布了一个问题。
问题:关于如何处理翻译的任何想法,例如:
Key: I have a[n] {fruit}
Variables: apple, banana
Result: I have an apple. I have a banana.
Key: Stimme für {user}[s] Einsendung
Variables: Paul, Markus
Result: Stimme für Pauls Einsendung,
Result: Stimme für Markus Einsendung
有人对此有解决方案或想法吗?我唯一的猜测是通过不使用出现这些问题的翻译来避免这种情况。其他平台如何处理这个问题?
当然,翻译系统不知道将哪种类型的词放在哪种类型的句子中。它只做一些字符串替换......
PS:土耳其语更复杂:
For example, on a profile page, we have "Annie's Network". This should translate as "Annie'nin Aği".
If the first name ends in a vowel, the suffix will start with an n and look like "Annie'nin"
If the first name ends in a consonant, it will not have the first n, and look like "Kris'in"
If the last vowel is an a or ı, it will look like "Dan'ın"; or Seyma'nın"
If the last vowel is an o or u, it will look like "Davud'un"; or "Burcu'nun"
If the last vowel is an e or i, it will look like "Erin'in"; or "Efe'nin"
If the last vowel is an ö or ü, it will look like "Göz'ün'; or "Iminönü'nün"
If the last letter is a k (like the name "Basak"), it will look like "Basağın"; or "Eriğin"