---
title: "Localization: Change languages in iOS PDF viewer | Nutrient"
canonical_url: "https://www.nutrient.io/guides/ios/features/localization/"
md_url: "https://www.nutrient.io/guides/ios/features/localization.md"
last_updated: "2026-05-25T16:07:03.523Z"
description: "Localization: Change languages in iOS PDF viewer | guide for Nutrient iOS SDK with detailed instructions and code examples."
---

# Localization: Change languages in our iOS PDF viewer

Nutrient iOS SDK comes with many built-in languages:

- Arabic (ar) ([including R2L interface support](https://www.nutrient.io/blog/pspdfkit-ios-6-4/))

- Chinese Simplified / Chinese Traditional (zh-Hans/zh-Hant)

- Croatian (hr)

- Czech (cs)

- Danish (da)

- Dutch (nl)

- English (en)

- English United Kingdom (en-GB)

- Finnish (fi)

- French (fr)

- French Canada (fr-CA)

- German (de)

- Greek (el)

- Hebrew (he)

- Indonesian (id)

- Italian (it)

- Japanese (ja)

- Korean (ko)

- Malay (ms)

- Norwegian Bokmål (nb-NO)

- Polish (pl)

- Portuguese Brazil / Portugal (pt-BR/pt-PT)

- Russian (ru)

- Slovak (sk)

- Slovenian (sl)

- Spanish (es)

- Swedish (sv)

- Thai (th)

- Turkish (tr)

- Ukrainian (uk)

- Welsh (cy)

These languages are used automatically depending on the preferred language. To enable a language, your application must also be localized in that language — otherwise, Nutrient will fall back to English (the reason being that you would otherwise end up with a partially translated app, which isn’t a good user experience).

To translate your app, follow [Apple’s localization guidelines](https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPInternational/LocalizingYourApp/LocalizingYourApp.html#//apple_ref/doc/uid/10000171i-CH5-SW1) and provide your `.strings` file in all the languages you want to support.

You can also use Nutrient’s [`setLocalizationDictionary(_:)`](https://www.nutrient.io/api/ios/documentation/pspdfkit/setlocalizationdictionary(_:)) or [`setLocalizationClosure(_:)`](https://www.nutrient.io/api/ios/documentation/pspdfkit/setlocalizationclosure(_:)) to customize the localization.

iTunes Connect doesn’t support all of these languages. However, iOS devices can still be set to these languages. Just be aware that there’s no localized storefront. See [here](http://kitefaster.com/2016/03/09/itunes-connect-api-app-store-and-corresponding-xcode-language-codes/) for a detailed list of Xcode language codes.

## Adding additional localization to Nutrient

You can add additional localization by adding the corresponding folders or setting a new localization programmatically.

To see all strings that should be localized, look inside `PSPDFKit/PSPDFKit.bundle/en.lproj/PSPDFKit.strings`. Nutrient uses `NSLocale.preferredLanguages` to determine a language and falls back to English if this method doesn’t return anything or the language isn’t available either in the `PSPDFKit.bundle` or the language dictionary. Nutrient won’t look into your default project strings file. To get all strings translated (including OS-level default buttons like Edit or Done), you need to add a `Localizable.strings` file of your target language to your project:

### SWIFT

```swift

setLocalizationDictionary([
    "en": [
        "Go to %@": "Browse %@",
        "%d of %d": "Page %d of %d"
    ]
])

```

### OBJECTIVE-C

```objc

PSPDFSetLocalizationDictionary(@{
    @"en": @{
        @"Go to %@": @"Browse %@",
        @"%d of %d": @"Page %d of %d"
    }
});

```

You can also use `setLocalizationClosure(_:)` to register a block that’s called every time a string is translated. In this way, you can easily use your default bundle or a custom bundle with `NSLocalizedStringFromTableInBundle`:

### SWIFT

```swift

setLocalizationClosure { stringToLocalize in
    guard let stringToLocalize = stringToLocalize else { return nil }

    // This will look up strings in `language/PSPDFKit.strings` inside your resource folder.
    return NSLocalizedString(stringToLocalize, tableName: "PSPDFKit", comment: "")

    // You can also route translation through your default localization:
    return NSLocalizedString(stringToLocalize, comment: "")

    // Or use a custom variant, for example, to test if everything is localized.
    // Keep in mind that several strings, like Edit, are provided by the system and are automatically translated, so long as you have the correct localization resources set.
    return String(format: "_____%@_____", arguments: [stringToLocalize])
}

```

### OBJECTIVE-C

```objc

PSPDFSetLocalizationBlock(^NSString *(NSString *stringToLocalize) {
    // This will look up strings in `language/PSPDFKit.strings` inside your resource folder.
    return NSLocalizedStringFromTable(stringToLocalize, @"PSPDFKit", nil);

    // You can also route translation through your default localization:
    return NSLocalizedString(stringToLocalize, nil);

    // Or use a custom variant, for example, to test if everything is localized.
    // Keep in mind that several strings, like Edit, are provided by the system and are automatically translated, so long as you have the correct localization resources set.
    return [NSString stringWithFormat:@"_____%@_____", stringToLocalize];
});

```

## Pluralization considerations

Nutrient uses both the `PSPDFKit.strings` file and the `PSPDFKit.stringsdict` file. A [`.stringsdict` file](https://developer.apple.com/library/ios/documentation/MacOSX/Conceptual/BPInternational/StringsdictFileFormat/StringsdictFileFormat.html) is used to define language pluralization rules, as some languages have more pluralization variants besides one and many; for example, see the pluralization rule for Croatian:

```xml

<key>%tu match(es) found</key>
<dict>
    <key>NSStringLocalizedFormatKey</key>
    <string>%#@tu_matches_found@</string>

    <key>tu_matches_found</key>
    <dict>
        <key>NSStringFormatSpecTypeKey</key>
        <string>NSStringPluralRuleType</string>
        <key>NSStringFormatValueTypeKey</key>
        <string>tu</string>
        <key>zero</key>
        <string>Nema pronađenih rezultata</string>
        <key>one</key>
        <string>%tu pronađen rezultat</string>
        <key>two</key>
        <string>%tu pronađena rezultata</string>
        <key>other</key>
        <string>%tu pronađenih rezultata</string>
    </dict>
</dict>

```

`PSPDFLocalize()` automatically looks in both the `stringsdict` and the classical `strings` files to look up localized strings.

## Forcing a specific language

You can manually override system defaults and force a specific language. We generally don’t recommend this, as it’s against Apple HIG. If you have a use case that requires this, recreate all UI elements manually after updating the setting or — ideally — simply restart the application to update the localization. You can achieve this by either setting [`setLocalizationClosure(_:)`](https://www.nutrient.io/api/ios/documentation/pspdfkit/setlocalizationclosure(_:)) and returning a custom language, or (better) changing this systemwide via setting the `AppleLanguages` in the user defaults. This needs to happen early, before your app initializes. You can place this in the `main.m/Main.swift` file before `UIApplicationMain` or simply use a function with a constructor attribute in an Objective-C file:

```objc

__attribute__((constructor)) static void PSCForceCustomLanguage(void) {
    [NSUserDefaults.standardUserDefaults setObject:@[@"de"] forKey:@"AppleLanguages"];
}

```

[See how this can be done in Swift here](http://stackoverflow.com/a/38429383/83160).

You can learn more about `AppleLanguages` in [Apple’s QA1391 article](https://developer.apple.com/library/content/qa/qa1391/_index.html). If your app requires updating localization at runtime without restarting the app, you can do more advanced tricks like [swizzling NSBundle’s `localizedString(forKey:value:table:)`](https://www.factorialcomplexity.com/blog/how-to-change-localization-internally-in-your-ios-application).
---

## Related pages

- [Customizing PDF viewer styling on iOS](/guides/ios/customizing-the-interface/appearance-styling.md)
- [Editing PDFs in our iOS viewer](/guides/ios/features/document-editor-ui.md)
- [Customizing our iOS PDF viewer](/guides/ios/user-interface.md)
- [Overriding classes in our iOS viewer](/guides/ios/getting-started/overriding-classes.md)
- [Customize electronic signatures UI on iOS](/guides/ios/signatures/customizing-the-signature-user-interface.md)
- [Customizing the toolbar in our iOS PDF viewer](/guides/ios/user-interface/main-toolbar.md)
- [Customizing the toolbar in our visionOS PDF viewer](/guides/ios/user-interface/main-toolbar-visionos.md)
- [Customizing menus on iOS](/guides/ios/customizing-the-interface/customizing-menus.md)

