Table of Contents

PhraseApp is a online editor for all common language file and locale formats including YAML, JSON, Gettext (.po), Properties, XLIFF, Android, iOS, ResX etc. You can always access your locale files and translations from within our online Translation Center.

Workflow

With PhraseApp your translation workflow will get much easier:

Add a new feature to your app that requires translations

Push new keys to PhraseApp or create them manually within our Translation Center

Deploy your new code to your staging environment and let your copywriters and translators change finalize the content and translations

Pull the updated locale files from PhraseApp and deploy changed translations to production

In-Context Editing

PhraseApp comes with an In-Context Editor for Rails, AngularJS, Django and Symfony. You can edit your copy or translations directly on your site without having to deal with localization files at all.

Your copywriters and translators will see the context of a certain text. While changing it they can immediately see if the length of the text fits in the given space or what the intention of a certain piece of text is.

Free your developers from having to deal with the content and structure of localization files by automating translation workflow with our API.

This will generate a .phrase config file in your project root that includes your secret key. We recommend adding it to your .gitignore file:

.phrase

Next, upload your locale files to the PhraseApp Translation Center:

$ bundle exec phrase push ./config/locales/

PhraseApp now knows about your locales and the keys in your application.

Pulling locale file changes

Whenever you want to deploy changed translations from our Translation Center you need to pull the locale files back to your repository, just as you would with git for changes made by other developers.

$ bundle exec phrase pull

PhraseApp automatically stores pulled translations in a different folder than your development locale files, phrase/locales. We advice to use a different locale folder for production to not overwrite any local changes accidentally. In order to tell the i18n gem about the new locales that should be used in production you have to configure the load path as well. When using Rails you can set the load path in your production.rb:

In-Context Editor

The In-Context Editor can for example be integrated in a staging environment for copywriters and translators. It is not recommended to include the PhraseApp In-Context Editor in your production environment because it is a authoring tool for your content and translation.

If you haven’t done so already, we recommend you to set up a staging environment as explained in the official Heroku documentation. The staging environment will be the place for your translators to translate your website content. Of course, you can also use your local develoment environment to see how PhraseApp integrates with your application. If you plan to do so, simply replace the staging with your development environment in the following steps.

Deploy application to staging environment

To finally get a look at PhraseApp you simply have to deploy the application to your staging system:

$ git push staging master

and open it in the browser:

$ heroku open

You now should see your application with the PhraseApp in-place editor on top of it. To create your first user with translation privileges, you have to log into phrase:

$ heroku addons:open phrase
Opening phrase for sharp-mountain-4005…

After logging in, you can access the user management under the “Account” menu. Simply create a user with an email address and password of your choice. You can now edit your text content right on the site!

Deploy translations

After you have finished translating a feature or content of your application, you will need to push the new translation files to production. In order to do so, you will first have to download them from PhraseApp and add them to your project: