Login Account

Properties

Properties files are used for localisation in various Java-based applications.

Getting Started Guide

This page documents all features and options for localising properties files with doloc.

Features

  • Supports key-value pairs
  • Your formatting (including comments, escaped characters, etc.) is preserved

Usage

curl https://api.doloc.io?sourceLang=en&targetLang=fr -H "Authorization: Bearer $API_TOKEN" -F source="@path/to/source.properties" -F target="@path/to/target.properties" -o path/to/target.properties

You’d need to provide the source texts as the first file and the target texts as the second file!

It is advised to use the sourceLang and targetLang options to specify the language of the source and target texts, if they cannot be inferred from the filename.

Options

Options are passed as query parameters in the URL.

The option untranslated can use any DNF combination of the described values. Here only a comma separated list of values for an OR combination is meaningful.

For details check the options documentation.

name values default description
sourceLang any IETF BCP 47 language tag such as en-US, de-DE, etc. inferred from filename - e.g. messages_en.properties infers en. Fallback to en This specifies the language of the source texts.
targetLang any IETF BCP 47 language tag such as en-US, de-DE, etc. inferred from filename - e.g. messages_fr_CH.properties infers fr-CH. This specifies the language of the target texts.
untranslated combination of missing, empty, equal. missing Translate all units that match this configuration. missing: not contained in target file. empty: has empty value in target file. equal: has the same value in source and target file.

Limitations

none that we are aware of 🙂

Please reach out, if you need support for these or other formats! 🚀