GetText Portable Object (PO) files are the industry standard for multilingual websites in PHP.
In this tutorial we’ll talk about how to translate PO, or POT files and maintain translations up-to-date.
First, let’s explain what the files are.
- POT – Portable Object Template. This is the file that you get when you extract texts from the application. Normally, you send this file to your translators.
- PO – Portable Object. This is the file that you receive back from the translators. It’s a text file that includes the original texts and the translations.
- MO – Machine Object. The MO file includes the exact same contents as PO file. The two files differ in their format. While a PO file is a text file and is easy for humans to read, MO files are compiled and are easy for computers to read. Your web server will use the MO file to display the translations.
Differences Between POT and PO Files
PO and POT files are essentially the same. The difference is in the intended use. This is why the two files have different extensions (.pot versus .po).
The tool that scans your PHP source will produce a .pot file. This file includes only the original texts, which need translation. You send this file to your translators.
The translator’s tool will be able to merge the texts from the .pot file with the existing translations (the .po file). It will mark new or modified texts as needing translation and will leave existing translation intact.
Free Translation Tools for POT and PO Files
Since PO / POT files are so popular, there are several excellent tools for translating them.
The best known tool is a program called poedit. poedit is a tool for translators. It allows merging between new texts in a POT file (compared to the current translation in the PO file) and produces both PO and MO as output.
There are some great open-source web-based tools for translating GetText files. For example, Drupal’s Localization project.
Professional Translation for POT / PO Files
If you’re also looking for translators for your POT files, try ICanLocalize Software Localization projects.
You can upload your PO or POT file to the project. A parser will go through your file and extract the texts for translation. It counts the words and calculates the cost for translation.
Then, you can choose translators for your project and get started. When translation is complete, you will receive back the completed PO and MO files. There’s no software to download. Translation can begin immediately and complete quickly as well.
Our Software Localization projects are tuned to your needs exactly. There’s one major goal – to provide the best translation possible.
To accomplish this, we’ve built powerful QA features inside the Software Localization system:
- Built-in Translation Review Process
- By default, all projects are done by two translators. One translator translates and the other proofreads.
- Issue Tracking System
- We translate just like you develop. When we find an issue, we track it. Before we deliver the completed translation, our system makes sure that all issues are closed and handled. No matter if you have a tiny or huge project, we’ll make sure that translation is 100% correct.
- Format Checker
- Many strings contain placeholders and HTML tags. Our system makes sure that translations contain the correct placeholders and tags as well.
- All Professional Translators
- All the translators in our system are certified professionals. Translators only write in their native language and must hold a university degree in translation in order to join ICanLocalize.
- Because we’ve automated the entire translation process, our translators can concentrate on translation. This allows a cost saving of 50% compared to contracting the same translators in translation portals. We pass this saving to you.