In a previous article, iOS Over the Air Translation with Phrase, we looked at how Phrase can make updating our iOS app translations much smoother using OTA. OTA allows us to avoid creating a new version of our app, and publish it through the App Store, when we want to push new translations to our app. This frees us up to focus on the content of our app, rather than the administrivia of publishing.
🔗 Resource » We highly recommend that you check out the previous article, iOS Over the Air Translation with Phrase. The article covers the basics of OTA, how to setup your iOS app to work with it, and what the basic OTA workflow looks like.
This article picks up where the first left off and explores some advanced features that come with Phrase OTA. We’ll look at how we can target only iOS with an OTA release (Phrase OTA is available for Android as well). We’ll also explore how, with Phrase OTA, we can stage our translations and test them before we publish them to production.
We’ll further look at how, when combined with Phrase’s handy branching feature, OTA helps us roll out specific locales with our releases. This means, for example, that we can update our English translations while our translation team is finishing our French ones. In fact, branches aren’t limited to a single locale, and can target a subset of our translations across locales—so we can have a feature-specific branch, for example. Branches and OTA working together can boost the efficiency of our localization workflow significantly, and we’ll be covering that a bit later here.
We’ll round out our round-up of OTA advanced features by taking a look at how we can target specific app versions with our releases. This can be quite helpful when the context and meaning of our translation strings change from version to version.
Distributions and Targeting Platforms
When we created a distribution in our first OTA article, we simply checked the ios checkbox and went about our day. It is important to remember, however, that we can use distributions to target our iOS app exclusively, target our Android app exclusively if we have one, or target both. We can have multiple distributions and mix and match our options here depending on the needs of our project.
We can choose which operating system(s) to target with our distributions
Quality Assurance: Testing our Translations Before Going Live
One of the best features of Phrase’s OTA translations is that we can stage and test them before they go live to our app users. This is built right into the OTA release workflow. In fact, when we create a release it defaults to a development release, which our app users won’t see. This connects the release to the development environment we configured in our first OTA article. When we set up the
Phrase instance in our app with our development environment token, we can see and test our latest translations.
🔗 Resource » A complete demo app with all the code required to run Phrase OTA (including setting up the development and production environments) is covered in our article, iOS Over the Air Translation with Phrase. You can also grab all the source code from that article’s Github repo.
A new release defaults to unpublished
At this point, we can make any edits to our translations and create new releases until we’re satisfied with our new app content. When we are, we can make our translations available to our production app with a simple push of a button.
✋🏽 Head’s Up » If the Publish button on your release’s row isn’t active, just refresh the page and it should become active.
Click Publish and 🚀
It really couldn’t be much simpler.
Using Branches to Limit Release Translations
Sometimes we want to roll out translations for one feature, or we may want to test one locale’s translations before releasing the other locales’. These scenarios are perfect candidates for PhrasApp’s branch feature. Translation branches, like Git branches, allow us to work on different sets of translations within the same project, without the mess of overlapping edits that can come with this kind of collaboration.
📖 Go Deeper » Covering translation branches in depth is a bit outside of the scope of this article. However, check out our dedicated guide for branches for more details on the subject.
Let’s say, for example, that we have some new copy that we want to test with our English-reading users. Our other locales’ translations may be unfinished, or we may not want to publish them until we test our English ones with our users first. To accomplish this let’s first create a branch.
First, if we haven’t done so already, we’ll head over to our Project Settings > Advanced tab in the Phrase web console, and enable branches.
Go to Project settings
Under Advanced, Enable branching and Save
Now when we’re working on our translations under Locales we just need to make sure that we have the right branch selected in our project’s branch selector.
Make sure you’re working on the right branch
Any changes we make under the selected branch will stay exclusive to this branch until we merge into the main project. We can update our English translations exclusively, for example, or add translations for a new experimental feature. Once we’re done, we head over to our OTA distributions page and create a new release.
When we create our release we need to make sure that we’re selecting the correct branch.
Limiting our new release to a specific branch
After that we can follow our usual OTA workflow. We can test things internally in our development environment, or publish the release to share our branch’s translations with our app’s users.
✋🏽 Head’s Up » While testing one locale is one way to use Phrase’s branches, we recommend that you have all your locales ready at the same time, and to use branches to target other things like app features.
Targeting Specific App Versions
While branches are powerful in that they allow us to release specific translations, they’re much more powerful when combined with Phrase OTA’s ability to target specific app versions with a release. For example, we may want to update the translations of a feature we’re maintaining on an older version or our app. Or we could be rolling out a brand new feature in a new version. In cases like this we can target the respective app versions specifically when we release our translations. This is especially helpful if the meanings of certain translation strings change across versions.
A Note on Phrase OTA and Semantic Versioning
To limit OTA releases to specific app versions, we first need to understand how Phrase OTA determines an app instance’s version. Phrase will first see if the app is using semantic versioning ie.
X is the major version,
Y is the minor version, and
Z is the patch version. For example, 1.2.5 would be major version 1, minor version 2, and patch version 5. If our app is already using semantic versioning, then Phrase OTA will just use that when determining the app instances to target with a versioned translation release.
Phrase will use an app’s semantic version if it’s provided
✋🏽 Head’s Up » If semantic versioning is used, Phrase will ignore the
Buildnumber of the app.
If, however, our app is not using semantic versioning, Phrase will fall back on concatenating the
Build numbers of our app. So an app instance with a
Version of 1.0 and a
Build number of 9 will be seen by Phrase as app version 1.0.9. We recommend using semantic versioning of our app when possible, as it makes everything a bit simpler.
Specifying the App Version for an OTA Release
To target a specific app version or a range of versions, we create an OTA release as normal—we just make sure to fill in the Min version and Max version fields before we Save it.
An OTA release that targets specific app versions
The minimum and maximum range is inclusive; if we specify 1.1.9 for the Min version and 1.1.12 for the Max version, all versions between and including 1.1.9 and 1.1.12 will be targeted by the release. And if we want to target a single version we can simply enter the same value for both Min version and Max version.
And that’s all. Once we save and publish, our release’s translations will only show up for users that have the versions of the app that we specified.
Further Reading (and Watching)
If you want to start at the beginning or explore different aspects of Phrase OTA, check out some of our other related guides and articles:
- Phrase Over the Air – Introduction
- iOS SDK Installation Instructions
- Phrase OTA Webinar Video
- iOS Over the Air Translation with Phrase (the prequel to this article)
OTA Translations with Phrase are Just the Tip of Iceberg
We hope you’ve seen how flexible iOS OTA with Phrase can be. When we create an OTA distribution we can target a platform. And when we create an OTA release we can target a locale, a feature, a specific range of app versions, or mix and match these criteria as we see fit. This can help us deliver our translations to the right users of our app with minimum time and hassle. And OTA is just one of many features Phrase has to offer. Phrase is a professional localization solution with a powerful web admin console that helps both translators and developers collaborate and localize software more efficiently. It also has a fully-featured API for developers to connect to, and a growing number of integrations with third-parties. Phrase can really streamline your team’s localization workflow. Check out all of Phrase’s features, and sign up for a free 14-day trial.