Help
Translate Java .xml properties files
🔗What are Java .xml properties files?
Java .xml files is one of the language files used to localize Java applications. The file format is based on XML and is a monolingual file containing pairs of keys and their translation.
WebTranslateIt is a software localization platform that can help localize Java .xml files.
🔗java .properties file example
Here’s an example of Java .properties file. WebTranslateIt will import each key-value pair a segment. The comments in the properties files will be imported as instructions.
WebTranslateIt supports entries with double quotes, single quotes and without quotes. This example highlights how strings can be laid out.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<comment>Rhyme</comment>
<entry key="seven-eight">lay them straight</entry>
<entry key="five-six">pick up sticks</entry>
<entry key="nine-ten">a big, fat hen</entry>
<entry key="three-four">shut the door</entry>
<entry key="one-two">buckle my shoe</entry>
</properties>
🔗Magic Comments
This file handler support the following magic comments:
- Comments containing
[MAXCHAR=xx]
will set a max character limit toxx
. Example:#. [MAXCHAR=20]
- Comments containing
[LABEL=xxxx]
will assign the label toxxxx
. Example:#. [LABEL=new feature]
🔗Encoding
Java XML files should be UTF-8 encoded.
🔗How to Translate a Java XML properties File?
It is easy to translate a Java XML properties file with WebTranslateIt. In a project, upload your source Android XML file in the File Manager and translate it on the Translation Interface.
The tools included in WebTranslateIt, such as Batch Operations, the Translation Memory or Machine Translation can help you translate that file automatically, faster and cost effectively.