Skip to main content
Java Properties (.properties)
Nick Ustinov avatar
Written by Nick Ustinov
Updated over 4 months ago

Java Properties files (.properties) are commonly used for managing configuration data and localization strings in Java applications. These files store key-value pairs, where each key represents a specific configuration setting or a text string to be localized. Lokalise supports .properties files, making it easy to translate and manage these files within your projects.

Technical information

Overview

Format name:
Java Properties

File extensions:
.properties

Common use cases:
Managing configuration settings and localization strings in Java applications.

Technical details:

  • Structure: Java Properties files consist of key-value pairs, where each key is associated with a specific value. The key and value are separated by an equals sign (=) or a colon (:). Comments can be added using the # or ! characters at the beginning of a line.

  • Encoding: ISO-8859-1 by default, but UTF-8 is also commonly used with proper escaping.

Example:
Here's an example of a typical Java Properties file:

# This is a comment
welcome.message = Welcome to Lokalise!
error.message = An error has occurred.
username.label = Username:
password.label = Password:

In this example, each key-value pair represents a localized string, with keys like welcome.message and error.message mapped to their corresponding translations.

Using with Lokalise

Lokalise supports Java Properties files, allowing you to manage and translate your configuration settings and localization strings within the platform.

Supported project types

Please note that Properties files can be uploaded only to Web and mobile projects.

Did this answer your question?