• <i id='5C45O'><tr id='5C45O'><dt id='5C45O'><q id='5C45O'><span id='5C45O'><b id='5C45O'><form id='5C45O'><ins id='5C45O'></ins><ul id='5C45O'></ul><sub id='5C45O'></sub></form><legend id='5C45O'></legend><bdo id='5C45O'><pre id='5C45O'><center id='5C45O'></center></pre></bdo></b><th id='5C45O'></th></span></q></dt></tr></i><div id='5C45O'><tfoot id='5C45O'></tfoot><dl id='5C45O'><fieldset id='5C45O'></fieldset></dl></div>

    <small id='5C45O'></small><noframes id='5C45O'>

        • <bdo id='5C45O'></bdo><ul id='5C45O'></ul>
        <legend id='5C45O'><style id='5C45O'><dir id='5C45O'><q id='5C45O'></q></dir></style></legend>
        <tfoot id='5C45O'></tfoot>

        类似于 Rosetta 的 PHP 翻译前端?

        时间:2023-10-02

        <small id='rNcZv'></small><noframes id='rNcZv'>

      1. <tfoot id='rNcZv'></tfoot>
              <i id='rNcZv'><tr id='rNcZv'><dt id='rNcZv'><q id='rNcZv'><span id='rNcZv'><b id='rNcZv'><form id='rNcZv'><ins id='rNcZv'></ins><ul id='rNcZv'></ul><sub id='rNcZv'></sub></form><legend id='rNcZv'></legend><bdo id='rNcZv'><pre id='rNcZv'><center id='rNcZv'></center></pre></bdo></b><th id='rNcZv'></th></span></q></dt></tr></i><div id='rNcZv'><tfoot id='rNcZv'></tfoot><dl id='rNcZv'><fieldset id='rNcZv'></fieldset></dl></div>

              1. <legend id='rNcZv'><style id='rNcZv'><dir id='rNcZv'><q id='rNcZv'></q></dir></style></legend>
                  <bdo id='rNcZv'></bdo><ul id='rNcZv'></ul>
                    <tbody id='rNcZv'></tbody>
                • 本文介绍了类似于 Rosetta 的 PHP 翻译前端?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我目前正在将 Web 应用程序从基于数据库的国际化方法(每个词在翻译表中都有一个条目,以及实际翻译)迁移到基于 看起来方向正确,但太简单了 - 它没有' 似乎无法处理多种语言和目录以及复数形式.

                  解决方案

                  我还没有看到其他方案,可能有以下原因.尽管 SimplePO 网站上有这样的说法,但翻译人员不喜欢并且通常不会在如上所示的并行翻译系统上工作.

                  这就是程序员想象翻译器工作的方式,但这是有缺陷的.翻译人员使用名为 TMX 的工具包,翻译记忆交换(​​通用名称,请参阅开源实现 Okapi 以了解它),并在此构建单词、短语和句子的翻译词典.他们采用不同格式的文件并将其输入 TMX 软件,这使他们第一次通过 60%、70% 等翻译,但就像谷歌语言 API 在目标语言中的意义方面被严重破坏.

                  然后他们所做的是翻译 TMX 未处理的单词,添加到合乎逻辑的词典中,然后将其口语化,即使其在目标语言中起作用并使其具有意义.出于这个原因,翻译人员应该始终翻译成他们的母语.

                  他们这样做的原因有很多,a) 有意义且有效并减轻了他们的工作量,b) 因为他们按单词付费并且进行并排翻译不允许他们使用他们的工具并最大化他们的收入.

                  翻译人员想要的是一个你可以导出的格式的文件,他们可以导入和翻译,导出并发回给你导入.

                  文件格式可以是 csv、rtf、tmx、xliff、gettext,如果你阅读了 Symfony 框架文档,你会看到他们是如何做和处理的(我认为他们做得很好).

                  说了这么多,大约 8 年前,当我不得不用英语、法语、德语、匈牙利语和斯洛伐克语编写一个网站时,我和 SimplPO 做了同样的事情,只是写了我自己的并排应用程序允许这样做.但是,我们为其编写应用程序的公司在内部完成了所有自己的翻译,因此我们没有遇到翻译问题.当我们这样做时,我们编写了一个到 RTF 的导出和从 RTF 导入(这本身就是令人难以置信的),这样翻译器就可以像上面一样工作.

                  然而,SimplePO 是我见过的这个想法的唯一其他实现.Zend 等框架似乎认为您只是创建查找标签来替换单词和短语,而没有在应用程序中构建控制来管理流程.因此,它很快就会失控,维护起来既困难又昂贵.

                  大多数编写多语言网站的人实际上并没有这样做.他们编写一个主站点,然后复制、翻译并维护翻译版本.对我们来说,逻辑类型看起来很笨拙,但实际上非常有效.

                  它有效的原因之一是 i18n 和 l10n 与语言之外的许多其他东西有关.

                  • 外观和感觉.盎格鲁撒克逊人喜欢冷色和 san serif 字体,西班牙裔人喜欢 Serif 字体和明亮的颜色.当您跨越其他文化时,您的期望在布局、类型、颜色等方面会大不相同.
                  • 法语和某种程度上的德语比同等的英语长 30%,更冗长,因此您的布局很快就会陷入困境.

                  • 闪族语言从右到左

                  • 日语和其他不基于字母的语言可以从上到下运行 ltr rtl,有些甚至没有空格
                  • 约会?美国、日本、英国、匈牙利各不相同
                  • 货币和数字格式,别让我失望

                  很抱歉继续总结:- 对于简单的并排,只需自己编写,我花了大约两周的时间没有任何框架,并在我继续使用标签替换时解决了它.但是,再考虑一下你在做什么.仔细.

                  I'm currently migrating a web application from a database-based internationalization approach (each word having an entry in the translation table, and the actual translation) to one based on Zend_Translate and CSV files.

                  I need to provide a end-user friendly way to update those translations quickly and easily. Ideally, to minimize the risk of breaking stuff, users would not edit the CSV files directly, but be shown a nice form with fields.

                  Do you know a standalone, PHP-based, end-user compatible translation frontend that supports one of the adapters Zend_Translate has to offer - ideally gettext or csv?

                  Something like Python's/Django's Rosetta but in PHP? Rosetta does exactly what I need:

                  but I would very much like to stay with PHP here for server setup reasons.

                  SimplePO looks like it goes in the right direction, but is too simple - it doesn't seem to be able to handle multiple languages and catalogs, and plurals.

                  解决方案

                  I have not seen another one and probably for the following reason. In spite of what it says on the SimplePO web site translators do not like and often will not work on side by side translation systems as shown above.

                  That is how programmers imagine translators will work and it is flawed. Translators work with a toolkit called TMX, Translation Memory Exchange (generic name see Okapi an open source implementation to get a feel for it), and in this they build up translation dictionaries for words, phrases and sentences. They the take a file of varying formats and feed it into the TMX software, this gives them a first pass that is 60%, 70% etc translated but like Google language API horribly mangled in terms of making sense in the target language.

                  Then what they do is translate the words not dealt with by TMX, adding to the dictionaries where logical, and they colloquialise it, i.e. make it work in the target language and make sense of it. For this reason the translator should always be translating into their native language.

                  They do it this way for a number of reasons, a) it makes sense and works and reduces their work load and b) because they get paid by the word and to do side by side translation does not allow them to use their tools and maximise their income.

                  What translators want is a file in a format that you can export, they can import and translate, export and send back to you to import.

                  The files formats can be csv, rtf, tmx, xliff, gettext and if you read the Symfony framework docs you can see how they do it and handle it (they do a pretty good job in my opinion).

                  Having said all that i was in a similar position about 8 years ago when having to write a site in English, French, German, Hungarian and Slovakian and i did the same as SimplPO and simply wrote my own side by side application to allow this to be done. However the company we were writing the application for did all their own translation in house so we didn't hit the problem with translators. When we did we wrote an export to RTF and import from RTF (that in itself is mind boggling) so the translators could function as above.

                  However SimplePO is the only other implementation of the idea i have seen. The frameworks such as Zend seem to think you just create lookup tags to replace words and phrases and build no control into the application to manage the process. Consequently it soon gets out of hand and the maintenance of it becomes both difficult and expensive.

                  Most people who write multilingual web sites actually don't. They write a master site and then make a copy, translate it and maintain the translated version. It seems clunky to us logical types but is actually very effective.

                  One of the reasons it is effective is the i18n and l10n are about many other things than language.

                  • Look and feel. Anglo saxons like cool colours and san serif typefaces, Hispanic peoples like Serif type faces and brighter colours. And as you cross other cultures the expectations vary wildly in layout, types, colours etc.
                  • French and to some degree German is 30% longer, more verbose, than the equivalent English so you layout goes to hell in a hand basket real quick.

                  • Semitic language run right to left

                  • Japanese and other language that are not alphabet based can run ltr rtl top to bottom and some do not even have white space
                  • dates? US, Japanese, UK, Hungarian as all different
                  • currency and number formats, don't even start me off

                  Well sorry to go on and to summarise:- For simple side to side just write it yourself, took me about two weeks without any frameworks and working it out as i went along just use tag replacement. But any more and consider what you are doing. Carefully.

                  这篇关于类似于 Rosetta 的 PHP 翻译前端?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:Zend Framework 1.11 与 Doctrine 2 集成 下一篇:使用 Zend Framework 创建 cronjob

                  相关文章

                  最新文章

                    <bdo id='l1JWi'></bdo><ul id='l1JWi'></ul>

                    <tfoot id='l1JWi'></tfoot>

                  1. <small id='l1JWi'></small><noframes id='l1JWi'>

                  2. <i id='l1JWi'><tr id='l1JWi'><dt id='l1JWi'><q id='l1JWi'><span id='l1JWi'><b id='l1JWi'><form id='l1JWi'><ins id='l1JWi'></ins><ul id='l1JWi'></ul><sub id='l1JWi'></sub></form><legend id='l1JWi'></legend><bdo id='l1JWi'><pre id='l1JWi'><center id='l1JWi'></center></pre></bdo></b><th id='l1JWi'></th></span></q></dt></tr></i><div id='l1JWi'><tfoot id='l1JWi'></tfoot><dl id='l1JWi'><fieldset id='l1JWi'></fieldset></dl></div>
                    <legend id='l1JWi'><style id='l1JWi'><dir id='l1JWi'><q id='l1JWi'></q></dir></style></legend>