One of the most common formats used for localization in all Java and JVM apps are property files as shown below. Every
file contains translations for a different language translation. It's a common case where those files have naming
convention like messages_{language}.properties
. For example: messages_pl-PL.properties
.
Such files are often used together with Thymeleaf template engine and for e-mail translations.
File format example
# common
email.user.hello=Hello, {0}
email.team=SimpleLocalize.com Team
email.broken.button.instruction=In case the button link doesn't work for you, please copy and paste the link in your browser
# user created
email.user.created.subject=Setup password for SimpleLocalize account
email.user.created.instruction.button=In order to set up a new password, click on the button below:
email.user.created.button.text=Setup password
Upload with CLI
simplelocalize upload --apiKey <PROJECT_KEY> \
--uploadFormat java-properties \
--uploadPath ./messages_{lang}.properties
Learn more about SimpleLocalize CLI and translations upload feature.
Download with CLI
simplelocalize download --apiKey <PROJECT_KEY> \
--downloadFormat java-properties \
--downloadPath ./messages_{lang}.properties
Learn more about SimpleLocalize CLI and translations download feature.
Import with API
curl
--request POST \
--url 'https://api.simplelocalize.io/api/v2/import?uploadFormat=java-properties' \
--header 'x-simplelocalize-token: <API_KEY>' \
--form [email protected]/path/to/your/messages.properties
Learn more about importing translations with API
Export with API
curl
--request GET \
--url https://api.simplelocalize.io/api/v3/export?downloadFormat=java-properties \
--header 'x-simplelocalize-token: <API_KEY>'
Learn more about exporting translations with API