
Table of content
How is LingoHub handling properties files comments? Here is another look at example resource files used in app localization in our ongoing series on file formats used in software localization here at LingoHub and elsewhere.
.properties files are commonly used in the Java world (and related platforms, for example they are used for the upcoming FirefoxOS apps). There is no real standard, and various dialects exist. Let’s look at, for example, how properties files comments are handled.
When using properties files in your localization project, LingoHub expects that:
key-value pairs are delimited with the equal character (=), and terminated by a new line. If the value should continue in the next line, the line should end with backslash ().
a place-holder can have this form: {name}, where name can consist of any number of non white space characters
comment lines start with hash (#) or exclamation mark (!), and everything up to the end of line is treated as a comment
a comment is assigned to the next key-value pair unless there are any blank lines in between
Java defines .properties files to be encoded in ISO-8859-1 with \u… and \x… escaping of non ASCII characters, but we allow users to choose their own settings
.properties files comments examples
# this comment is ignored because it is not directly followed by a key-value pair
! comments in .properties files can start with exclamation mark
hello_user = Hello {username}
\## the value can continue to the next line if the previous line ends with a backslash
welcome_message = Welcome back,
we have missed you
\## multi line comments belong to the next key value pair
\## as long as they are not interrupted by a white line
visit_count = this is your {visit} visit to our siteReferences:
Related articles

PHP internationalization - i18n mechanisms tutorial
Looking for effective PHP internationalization with fewer hassles? We found the solution that will help you. Learn more inside our blog
Internationalization (i18n) in .NET MVC (resx)
Learn how internationalization works in .NET MVC, including RESX resource files, culture settings, interpolation, and pluralization.

Internationalization for Ruby - i18n gem
One of the most popular Ruby gems for internationalization is Ruby I18n. We overviewed i18n for Ruby on Rails in this article. Click and find more inside.
