iOS Localization: Translate .strings and .stringsdict Files with PTC

PTC gives you Better Than Human Translations for iOS and macOS apps. Learn how to prepare your code and use PTC to translate .strings and .stringsdict files automatically.

Translating Your App for the First Time with PTC

To localize your iOS or macOS app, you’ll work with two types of files:

  • .strings for static UI text like labels, buttons, and alerts
  • .stringsdict for plural forms and dynamic text based on numbers or variables

The setup takes a few steps. You’ll prepare your code so Xcode can export the right strings, organize your localization files, set up your project in PTC, and provide some basic context. After that, PTC handles the translations automatically.

Step 1: Refactor Strings for Localization

PTC can only translate strings that are properly marked for localization using NSLocalizedString.

Correct:

swift

Text(NSLocalizedString("welcome_title", comment: "Welcome screen title"))

Incorrect:

Text("Welcome to the app")

Hardcoded strings won’t appear in the .strings file you’ll soon need to create, so PTC won’t see or translate them.

Step 2: Handle Plurals and Dynamic Text

Use NSLocalizedString and String(format:) for messages that vary based on numbers or values. This lets you support multiple plural forms across languages.

Correct:

swift

let count = 3
let message = String(format: NSLocalizedString("unread_messages", comment: "Number of unread messages"), count)

Later, you’ll define the pluralization logic for unread_messages in a .stringsdict file.

Incorrect:

swift

let count = 3
let message: String

if count == 1 {
    message = "You have 1 unread message"
} else {
    message = "You have \(count) unread messages"
}

This logic works in English, but breaks localization. Many languages use different plural forms and sentence structures.

Just like with static and plural text, use NSLocalizedString in your code to mark dynamic content for translation. This includes names, numbers, or other variables. Avoid splitting up or concatenating sentences.

Correct:

swift

let userName = "John"
label.text = String(format: NSLocalizedString("WELCOME_USER", comment: "Welcome message with user name"), userName)
s"), count)

Incorrect:

swift

label.text = NSLocalizedString("HELLO", comment: "") + userName

This example splits the sentence into parts. Since different languages use different grammar or word order, you might end up with unnatural or incorrect translations.

Step 3: Create the Base Localization Files

In Xcode:

  1. Right-click your project folder New File
  2. Choose Strings File and name it: Localizable.strings
  3. Right-click again New File
  4. Choose Strings Dictionary File and name it: Localizable.stringsdict

Add them to your app target. Place both in your base language folder, like en.lproj.

Step 4: Add Keys and Text

Open your .strings file and define the keys you used in your code:

"welcome_title" = "Welcome to the Translation Demo!";
"unread_messages" = "You have %d unread messages";

Then define plural logic for unread_messages in Localizable.stringsdict:

<plist version="1.0">
<dict>
  <key>unread_messages</key>
  <dict>
    <key>NSStringLocalizedFormatKey</key>
    <string>%#@unread@</string>
    <key>unread</key>
    <dict>
      <key>NSStringFormatSpecTypeKey</key>
      <string>NSStringPluralRuleType</string>
      <key>NSStringFormatValueTypeKey</key>
      <string>d</string>
      <key>zero</key>
      <string>No unread messages</string>
      <key>one</key>
      <string>You have 1 unread message</string>
      <key>other</key>
      <string>You have %d unread messages</string>
    </dict>
  </dict>
</dict>
</plist>

Step 5: Make Sure the Files Are In Your Xcode Project

If you created the files outside of Xcode or don’t see them in the project navigator:

  1. In Xcode, right-click your project in the Project Navigator
  2. Select Add Files to [YourProjectName]
  3. Select your en.lproj folder
  4. Make sure Add to target is checked for your app and click Add

 You should now see Localizable.strings and Localizable.stringsdict under en.lproj in Xcode.

Step 6: Commit Your Localization Files to Git

As you’ll learn below, you can choose to use PTC in different ways. For example, if you want continuous localization, you can integrate PTC with your code repository. In this case, your .strings and .stringsdict files need to be committed to your repository:

  1. In Xcode, confirm the files are added to your project
  2. Use your Git tool (or terminal) to stage and commit the files
  3. Push the commit to the correct branch

Step 7: Sign Up for PTC and Choose How to Use It

Once you sign up for a trial account, you have three ways to use PTC:

  • Integrate PTC with your GitLab, GitHub, or Bitbucket repository
    Best for continuous translation. PTC auto-detects changes to .strings and .stringsdict files and sends merge requests with new translations.
  • Upload files manually
    Great if you want to check how PTC’s translations look. You’ll upload source files and download translated files yourself.
  • Use the API
    Upload and fetch translations programmatically.

    Step 8: Provide Product Context and Choose Languages

    PTC uses advanced AI to deliver Better Than Human Translations, but to do this, it needs just a bit of context. You’ll be asked to name your app, describe what it does, and explain who it’s for. This gives PTC the background it needs to translate strings with the right meaning for your app.

    Providing information about your app during project setup in PTC

    Next, choose the languages you want to translate into. Choose from over 33 supported languages—PTC delivers context-aware translations for each one.

    Step 9: Add Translated .strings Files to the Project

    When PTC returns the translated files, download and extract them.

    1. Copy each .lproj folder (like es.lproj) into your Xcode project’s main source folder (alongside your base Localizable.strings).
    2. In Xcode, right-click the project navigator and select Add Files to “[YourProjectName]” to add the folders.
    3. Choose Create folder references (the blue folder icon).

    Step 10: Test Your Localization Setup

    After merging the translations, test your app to make sure everything works correctly:

    1. Build and run the app in Simulator or on a device
    2. Change device language in Settings General > Language & Region
    3. Verify that your UI shows the correct translations
    4. Test plural rules to make sure .stringsdict entries work as expected

    Step 11: Translate and Update Your App Store Listing

    Your app’s description text isn’t part of the .strings or .stringsdict files, so you need to translate it separately.

    From the PTC dashboard:

    1. Go to Translations → Paste to translate
    2. Add your app’s name, subtitle, short and long descriptions, and keywords
    3. Select the target languages
    4. Copy the translations provided by PTC

    Then, in App Store Connect:

    • Open your app and select the version you want to submit
    • Under Localizations, choose each language
    • Paste the translated text into the correct fields
    • Submit the version when you’re ready

    This makes your app discoverable and appealing to users in their own language.

    Keep Your iOS/macOS App Translations Up to Date with PTC

    If you want PTC to detect and translate new or changed strings automatically, use the Git integration.

    This way, PTC checks for changes in your .strings and .stringsdict files and sends updated translations via merge request.

    If you update your App Store description, just paste the new version into Paste to translate and get the updated translations.

    Your app stays fully localized — without adding extra steps to your development workflow.

    Better Than Human Translations for Your iOS/macOS App

    Sign up and start translating your .strings and .stringsdict files — free for 30 days.

    Scroll to Top