Learn how to prepare your iOS apps for translation and then use the Private Translation Cloud (PTC) to fully translate your apps.
This guide walks you through:
- Preparing strings for localization
- Translating your app with PTC
- Testing your localized app
To better demonstrate the process, we’re using a basic SwiftUI demo app. We show all Git commits along the way.
Following this guide, your app will support any number of languages with highly accurate translations — powered by PTC.
Step 1: Creating the iOS app
We start by creating a basic app with hardcoded strings. This step is useful for you to follow the code changes and test the workflow, if you want.
1. Open Xcode and create a new project by going File → New → Project.
2. Select App under iOS.
3. Name your project and select SwiftUI as the interface.
4. Replace the contents of ContentView.swift
with the following code:
import SwiftUI
struct ContentView: View {
var body: some View {
VStack(spacing: 20) {
Text("Welcome to the Translation Demo!")
.font(.title)
.padding()
Text("This app will demonstrate iOS localization step by step.")
.padding()
Button("Tap Me") {
print("Button tapped!")
}
.padding()
}
}
}
#Preview {
ContentView()
}
Commit reference C9b9fe8: Initial commit: Simple demo app with hardcoded English strings, no localization.

Step 2: Prepare Your App For Translation
Before you can translate your iOS app, you need to make your app’s content translatable by:
A. Refactoring strings to make the content visible to software translation tools
B. Creating the base Localizable.strings file to store translated text
A. Refactor Strings for Localization
Hard-coded text in your app can’t be seen by localization tools. To fix this, update your code to use NSLocalizedString()
for all user-facing text, like buttons and messages. It’s good practice to also add comments to help define each string.
In our example, we use the following:
Text(NSLocalizedString("welcome_title", comment: "Welcome screen title"))
.font(.title)
.padding()
Text(NSLocalizedString("description_text", comment: "App description on main screen"))
.padding()
Button(NSLocalizedString("button_tap_me", comment: "Button to tap")) {
print("Button tapped!")
}
.padding()
Commit reference 0e1f565: Refactor: Move all user-facing strings to NSLocalizedString for localization readiness.

B. Create the Base Localizable.strings File
In Localizable.strings files, you keep translations to particular text. Each language supported in your multilingual iOS app will have its own Localizable.strings file under the respective folder (e.g. en.lproj/Localizable.strings for English, es.lproj/Localizable.strings for Spanish etc.)
Here, we’ll create the base file in the original language (English).
- To create the file, right-click the main source folder in Xcode and choose New File → Strings File.
- Name the new file
Localizable.strings
. - Now, add the keys you used for your user-facing texts (e.g. “welcome_title”) and their actual text.
💡Tip: Ensure your .strings files use UTF‑16 encoding.
For our example, we add the following:
"welcome_title" = "Welcome to the Translation Demo!";
"description_text" = "This app will demonstrate iOS localization step by step.";
"button_tap_me" = "Tap Me";
Commit reference 41d16bb: Add Base Localizable.strings file for English language.

Step 3: Translate Your App with PTC
Now that your app is translatable, you can use PTC’s advanced AI to get high-quality translations.
💡Tip: Before translating, make sure to commit and push your latest code to your repo.
- Create your free-trial account, which gives you full access to all PTC features for 30 days. If you already have an active account, simply log in.
- Follow the project setup. There are different ways to use PTC. But, connecting your repository with an access token is best for integrating localization with development. PTC then sends translations as merge requests for you to use right away.
- At the Resource files step, mark the
Localizable.strings
file as a translatable resource and define the output path. This tells PTC to export each translation into a correctly named language folder.
In our example, the output is:
TranslationDemo/{{lang}}.lproj/Localizable.strings

When you first set up a project, you may see the error “The path must have a .strings extension“. This is expected because the project doesn’t have translations yet. But, the next time you translate, you won’t see the error anymore.
Finish the project setup and let PTC do the translating! You can wait for the merge request or continue to the PTC dashboard.
PTC notifies you on the dashboard when the MR with translations is sent. You can always check translated texts under Translations.

Step 4: Add Translations To Your Project
To get the latest translations, simply merge the PTC merge request.
If you’re working on a local app or demo, you should also:
1. run git pull
This fetches the .lproj
folders and translation files from the repository and automatically adds them to your Xcode project.
2. In Xcode, right-click the navigator and choose Add Files to “[YourProjectName]”.
3. Select each .lproj
folder and choose Create folder references (blue folder icon).
In our example, we translated into Spanish and Arabic, so we extracted and added the ar.lproj
and es.lproj
folders.
Commit reference c488d5a: Add Arabic and Spanish Localizable.strings files for localization support.

Step 5: Test Your Localized iOS App
To verify your translations:
- Launch the iOS Simulator (or use a real device).
- Go to Settings → General → Language & Region, and select a supported language (e.g., Arabic or Spanish).
- Relaunch your app and confirm the translated strings appear.


To simulate right-to-left (RTL) layouts, like Arabic:
- In Xcode, go to Product → Scheme → Edit Scheme
- Set Application Language and Application Region to your target locale
How iOS Selects Languages
iOS automatically chooses the appropriate .lproj
folder based on the user’s preferred device language.
Just make sure to include the translations in correctly named folders — no other coding required.
Troubleshooting
If translations don’t appear:
- Ensure
.lproj
folders and theirLocalizable.strings
files are included in the app target - Clean and rebuild the project
With PTC, you get…
- Instant, Better Than Human Translations
- Integration with your software repository and translations sent as merge requests
- Unlimited translation rounds, enhanced by AI and machine learning
- Continuous localization for WordPress themes and plugins