Play Framework PhraseApp Setup
This guide will lead you through the integration of PhraseApp into an existing Play Framework application.
- Install the PhraseApp command line client
- phraseapp init
- phraseapp push
- phraseapp pull
This guide covers the setup of a Play application with PhraseApp for translation management. Play Framework is a High Velocity Web Framework for Java and Scala. This article covers Play version 2.
If you’re new to internationalization with Play Framework, you might want to check out the i18n guide from Typesafe.
Add the desired languages you would want to accept to your
conf/application.conf with priority from important to less important locale like so:
Add the files
messages.fr to your
Using the proper format for your localization files is important. PhraseApp supports the Play Properties format with UTF-8 encoding.
A sample valid Play Properties file might look like this:
# My Software Project (description) project.name=Some Name title1=AwesomeApp # You can never have enough titles! more_titles=Another Title
To initialize the project configuration, just follow the instructions to initialize the PhraseApp command line tool:
$ phraseapp init
This will guide you through the necessary steps to configure your sources and targets for your project. Make sure you select
play_properties as your locale file format.
Uploading your data to PhraseApp is easy. Just execute the
$ phraseapp push
All existing localization files found in your path will be uploaded to your PhraseApp project. Log into Translation Center to see your existing translations and add new languages or keys.
Once you have finished working on your translation in Translation Center or the In-Context Editor, you might want to download the data back into your project. This can be done by executing the
$ phraseapp pull
Now that your app has the latest translations you can start collaborating with your team members and edit your translations from within the PhraseApp Translation Center.