問題描述
我目前正在將 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模板網!