But to do this, they specified their own translation format, the very flexible Yaml file. There are already a lot of formats floating around, and translation tool vendors and open-source translation developers have been working for a long time on conversion tools between them. The Translate Toolkit and Pootle emerged from South Africa (a country which
- moz2po - Mozilla .properties and .dtd converter. Works with Firefox and Thunderbird
- odf2xliff - Convert OpenDocument (ODF) documents to XLIFF and vice-versa.
- prop2po - Java property file (.properties) converter
- php2po - PHP localisable string arrays converter.
- sub2po - Converter for various subtitle files
- txt2po - Plain text to PO converter
- po2wordfast - Wordfast Translation Memory converter
- po2tmx - TMX (Translation Memory Exchange) converter
- pot2po - initialise PO Template files for translation
- csv2po - Comma Separated Value (CSV) converter. Useful for doing translations using a spreadsheet.
- csv2tbx - Create TBX (TermBase eXchange) files from Comma Separated Value (CSV) files
- html2po - HTML converter
- ical2po - iCalendar file converter
- ini2po - Windows INI file converter
- json2po - JSON file converter
- web2py2po - web2py translation to PO converter
- rc2po - Windows Resource .rc (C++ Resource Compiler) converter
- symb2po - Symbian-style translation to PO converter
- ts2po - Qt Linguist .ts converter
- xliff2po - XLIFF (XML Localisation Interchange File Format) converter
In its heels, Google introduced the Google Translate Toolkit, which lets you use the Google Translate engine to suggest translations (based on its own databases or translation memories you provide). It also does the core of what Pootle does: collaboration, access, but without crashing and flakiness, and it works with:
- AdWords Editor Archive (.aea)
- Android Resource (.xml)
- Application Resource Bundle (.arb)
- Chrome Extension (.json)
- GNU gettext (.po)
- HTML (.html)
- Microsoft Word (.doc)
- OpenDocument Text (.odt)
- Plain Text (.txt)
- Rich Text (.rtf)
- SubRip (.srt)
- SubViewer (.sub)
English source Yaml file | Spanish Yaml file produced by i18n-translators-tools from a PO file |
page_info: sales/credit_notes: date: "Date" title: default: "Sales Credit Note" new: "New Sales Credit Note" |
page_info: sales/credit_notes: date: "Fecha" title: default: default: "Sales Credit Note" translation: "Crédito de venta" new: default: "New Sales Credit Note" translation: "New Sales Credit Note" |
There are some interesting things going on here: the Spanish Yaml file provides fallbacks so untranslated strings don't come through as blank. The intermediate gettext PO file keeps the tree structure in the msgctxt metadata, and looks like this:
msgctxt "page_info.fuji_sales/sales_credit_notes.title.default" msgid "Sales Credit Note" msgstr "Crédito de venta" msgctxt "page_info.fuji_sales/sales_credit_notes.title.new" msgid "New Sales Credit Note" msgstr "New Sales Credit Note"
So it's possible to use Google Translate Toolkit to translate your Rails Yaml files, provided you use the i18n-translators-tools library to do the conversions, and configure your Rails applications to support fallbacks.
2 comments:
I want to recommend this online translation tool also: https://poeditor.com. It would make a useful addition to your list. I recommend it because you can work efficiently with its interface and translation features. It doesn't support yaml yet, but I noticed that they are very open to suggestions.
Hello! Here is a free yaml to po converter tool http://yml2po.com/ that works in both directions. If you want to add it to your list.
Post a Comment