Software Localization of .properties Files with Wordbee

by | Jan 30, 2019

About GlobalVision

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.

Welcome to the first of a series of blog posts where we go over the file preparation requirements of many graphical user interface (GUI) files using Wordbee. The file formats that we will discuss are:

  1. .Properties
  2. .CSV/.XLS/.XLSX
  3. .XML
  4. .PO
  5. .RESX

We will define the file format and its use, describe the difficulties usually faced in properly parsing the files so that translators do not corrupt the code while translating the GUI strings, present you with the unique benefits that Wordbee offers and provide examples of what the files look like and how they show up for the translator in Wordbee.

Not all computer aided translation (CAT) tools or translation management systems (TMS) are perfect for the localization of software files. Wordbee comes very close in many aspects and this blog posts series will help software localization professionals understand how to best use the capabilities built-in.

In this blog post, we will discuss how Wordbee is used to assist in the localization of .properties files.

What is a .properties file?

Properties files are widely used in Java applications often to store configuration or localization data.

Originally developed and released by Sun Microsystems in 1995, with the proliferation of the internet, Java gained enormous popularity by being the prime computer programming language of choice for the development of client-server web apps.

The structure of the .properties file format is relatively simple and each line consists of a Key and its associated Value, separated by the equal sign (=), the colon sign (:) or a whitespace ( ).

Comment lines in .properties files are preceded by the number sign (#) or the exclamation mark (!).

# Sample .properties file
! property_Key=property_Value
! property_Key:property_Value
! property_Key property_Value

breadcrumbs.admin.log.deviceLog=Device Logs
currentPassword=Current Password
device.log.save.disabled.selection=You must select only one log to download.
systemConfiguration.password.max.age=Maximum Password Age(Days)
systemConfiguration.password.notification=Notification(Days)

How to translate .properties files in Wordbee?

Wordbee’s extensive list of supported file formats includes .properties files. Wordbee’s parsers recognize the different Key/Value syntax and enable only the “Value” content for translation while keeping the “Key” content safe from edits.

It is worth noting that Java .properties files values may also include other denotations to mark parameters, variables, html content, escaped characters etc…

Highlighted in red below, these denotations need to be protected as well to stop translators from altering the integrity of the code.

systemConfiguration.password.fields.greater.not.zero=Must be greater than {0} if not 0.
systemConfiguration.password.fields.greater.value=Must be greater than {0}.
systemConfiguration.password.fields.less.than={0} can not be equal and greater than {1}.
user.change.password.notification=Your password will expire in {0} days, click this link to <a href=”{1}” class=”special”>changepassword</a>.
user.change.password.notification.tomorrow=Your password will expire tomorrow, click this link to <a href=”{1}” class=”special”>change&nbsp;password</a>.

You can configure the settings and use the regular expression engine for the parameters that are not covered by the settings to get optimal results. Text patterns captured by the regular expressions that we defined lock these variables and convert them to internal markup and thus protect them from inadvertent alteration during the translation process.

What do .properties strings look like in Wordbee?

Below is a sample content from the .properties file we worked on.

Example 1: Standard Key – Value parsing

In this example, you can see how the Wordbee parser displays and enables only the strings needing translation, keeping them in the order in which they show up in the .properties file to maintain proper relationship and context.

login.session.expire.message=Logged out of your session, please login again.
nav.log.view.device=View Device Logs
nav.log.view.server=View Server Logs


Screenshot of Wordbee Editor

Example 2: Use of Variables in .properties files

Note in this example how Wordbee enables the strings for translation while making the variables visible, but untranslatable. This helps the translator understand the structure of the sentence so that the translation is rendered in a grammatically correct way.

systemConfiguration.password.fields.less.than={0} can not be equal and greater than {1}.


Screenshot of Wordbee showing variables

Example 3: Use of HTM tags in .porperties files

In the above example, html tags are protected but displayed to allow the translator to move them around based on what the translation requires without deleting them.

user.change.password.notification=Your password will expire in {0} days, click this link to <a href=”{1}” class=”special”>changepassword</a>.


Screenshot of Wordbee showing moveable tags

Why is this process unique to Wordbee?

Unlike other CAT tools, Wordbee parsers use different settings and tweaks in order to enable special and custom requirements that we see in many .properties files.

For instance, one of the benefits of this flexible approach is to be able to define the Keys that should not be translatable as they need to stay in the source language.

Another setting enabled us to protect comments in the .properties file which hides them from the translators and discounts them from the word count and therefore the costs of translation. But another option that Wordbee offers is to keep them visible in the editor for translators to see and read. This is helpful when translators need comments to better understand the context or intent of the strings that are to be translated.

In this case however, they are added to the word count to translate and translators may translate them, which is not required for the proper operation of the localized software. It would be nice to have an option to include comments for the translators to see, but protect them so that they are not added to the costs and tasks of translation.

Translate GUI in Context

It is often not a good idea to translate GUI strings in vacuum. Continuity of the strings and the ability for the translator to see their sequence in the correct order is paramount for maintaining the correct meaning of the translation.

Wordbee allows you to share valuable background information and support documents in the project directory to be available to all the translators and reviewers that will assist in helping the translators better understand the context of the translation. The image below shows where Reference material can be stored and retrieved.

With its often unique features, Wordbee helps maximize translation quality and minimize code corruption and quality assurance time.

More benefits of applying the right software localization process

There are many benefits to properly parsing and localizing .properties files. Here are only a couple of them. Many more will be address in future blog posts.

  1. By limiting translators in the translation editor to only access and translate the strings that require translation, you eliminate the risk of breaking the code which will cause many problems in building the software correctly and running it.
  2. Also, by separating the text to translate from the text that should not be translated, you can store strings undergoing translation in the translation memory database of your CAT or TMS tool. This enables easy translation reuse and faster release of localized software, when the source software is constantly updated.

We will be addressing how to localize spreadsheet file formats in the next blog post, so stay tuned!!!!!!!

 

Is this interesting?

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

Want cool localization techniques straight to your email?

Want cool localization techniques straight to your email?

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

You have Successfully Subscribed!

Wordbee all-round features

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


Integrations

Complete middleware solutions for CMS, DMS, and ECM systems. Connect to your localization ecosystem and translate like the wind.