Software Localization of .PO Files with Wordbee

by | Jun 25, 2019

About GlobalVision

GlobalVision International, Inc.

This blog post was contributed by GlobalVision International, Inc. a software localization and translation service provider. You can find similar posts on translation, localization technology, website globalization and medical translation trends on the company’s blog: GlobalEyes.

Ed. Note. Thanks to GlobalVision for this post. They are one of the pre-eminent providers of software localization services in the USA. If you are struggling with software localization, you can count on GlobalVision for excellent results.

Have you faced the need to localize a .PO file yet? A .PO file is a portable object file often referred to as gettext file. Not to be confused with the .properties files that we discussed in a previous software localization post. If you are dealing with localizing a website, you most likely have.

gettext is used for writing multilingual programs on Unix and Unix-like operating systems. It is commonly used for internationalization and localization (i18n and l10n). The most used implementation of gettext is GNU gettext, released by the GNU Project in 1995. gettext was originally written by Sun Microsystems in the early 90s.  Later, the GNU Project released GNU gettext as a free software implementation in the mid-90s.

What Do PO Files Look Like?

Written in plain text format, a PO file contains several user-interface messages and is commonly used in software and website development.

Each message contains the keyword msgid followed by the text wrapped in double quotes. The keyword msgstr will hold the translation, also in double-quotes.

Since both source and target texts are included in the same file, some translation memory tools are challenged as they don’t handle source and target strings in the same file. This requires engineers to merge the translated strings inside the original file. Additional programming and steps are hence needed.

Wordbee however, offers a much more elegant solution.

Example of a PO File

Many tools automatically export .PO files for translation. If you use Drupal or WordPress for your website’s Content Management System (CMS) and are looking to localize your website content into one or multiple languages, you most likely have run into PO files.

Here is a short example of a PO file from a web app:

.PO file example.

The PO file typically will contain all the strings that are visible to the user. They will include menu strings, headers, text, alt and other meta tag strings… To fully localize a website, plugins should also have their strings extracted for translation.

Text that is extracted from a website often contains htm tags like <a>, <i>, <b>, <u>, <p>, <br>… Furthermore, text that is extracted from software may contain delimiters and variables like %s and \n.  All require the translators to maintain them in the translated strings and at the correct location to avoid display and content errors.

How Wordbee Handles PO Files

Wordbee is set up to look for the string after “msgid” as the source text and save the translation in the string after “msgstr”. An additional option helps to protect html tags if the text is html based.

An advantage over other PO editors and CAT tools is that Wordbee features more settings for more complex text in the “msgid” strings. The regular expression can be used while parsing the text in the source segments to define as either translatable or not translatable. Single words, terms or portions of a segment can be excluded from translation and the text captured by regular expressions is converted to markup and thus protected from modification.

If your .PO files already have some translated entries, Wordbee will read out both and show them in the respective source and translation columns in the editor. Project managers or translators can then decide how these translations are imported via exact 100% or fuzzy matches.

In our example above, Wordbee will extract all the needed text and present it in the editor for translation. Note how %s and $status are protected since they are variables and should not be translated.

Parsed .PO file in Wordbee.

Having the strings correctly parsed in Wordbee, a translator can easily translate the needed strings without being distracted by unnecessary code or trying to identify what should be left intact to not break any code-related syntax.

Translation Reuse

Once the file is properly setup in Wordbee, translators only need a web browser and an internet connection to perform the translation. Using Wordbee’s online translation memory interface, translators can reuse existing translations or fuzzy matches and apply them to PO files. Also, they can store new translations in the translation database for future reuse.

Furthermore, Wordbee will automatically include the translated string in the msgstr line eliminating the need for engineers to run any special steps to merge the translation with the source string in the .PO file. You can export the fully translated PO file from Wordbee immediately after the translation and edit process is completed.

Wordbee Beebox API, SDK and Connectors

As you can see, Wordbee offers an exceptional and direct solution to translate PO files. But it does not stop here! With the advent of Beebox and its API, SDK and connectors, you can integrate Wordbee with WordPress, Drupal or other CMS solutions.

With that, you can automate the process of importing new or changed strings from your website to translate in Wordbee and upload back to your CMS different language settings.

This helps keep all your languages synchronized and up to date in almost simultaneous time. Which will help keep all your international audiences, regardless of their languages, satisfied!

Do You Have PO File Software Localization Requirements?

Tackling any internationalization and software localization requirements on your own can be daunting. There are many issues to deal with and overcome. Luckily, mature tools and processes are already in place to facilitate and streamline these tasks.

Whether you are looking for ways to externalize your user strings, or have already done so and want to localize PO files, or are considering localizing any other software file formats such as .properties, .XML, .XLS, .RESX or others, Wordbee is a great place to start.

If you have any questions or prefer to outsource your internationalization and software localization projects to experts that are experienced with localization requirements of any type of file and Wordbee, do not hesitate to contact us at GlobalVision. Our team will gladly and promptly answer all your questions.

Is this interesting?

Subscribe to get interesting localization podcasts, discussion panels, and articles every month.

Wordbee all-round features

Reaching global markets means you need to get your translation management together. 

Want cool localization techniques straight to your email?

Keep up on the latest in localization management techniques with Wordbee.

You have Successfully Subscribed!