Some test text!
iOS / Guides / Localization
The Tools.framework ships with its user-facing strings written in English. This
guide explains how you can localize the framework for any language.
If you are compiling the Tools framework from source (not recommended), follow
these instructions
to perform localization.
To localize the Tools.framework user-facing strings, all you need to do is add
a strings file to the main bundle of your app.
To add a strings file in Xcode, go to File -> New… -> File in the menu bar.
From the file templates window, choose Strings File from the Resource section
and click Next. This new file must be named PTLocalizable.strings in order
for the Tools framework to correctly identify the appropriate file to use for
localization.


Localization can be added to your app by following these steps:
Select your project from the Project navigator.
Select your project from the dropdown or list of projects and targets.
Add a new localization by clicking on the plus sign below 'Localizations'.

Once your app is configured for localization, clicking 'Localize…' in Xcode's file
inspector for PTLocalizable.strings will allow you to localize the file.

To see which strings in the Tools framework can be localized, see the included
Localizable.strings reference files. The location of these files depends on how
the framework was integrated into your app:
| Integration | Path | Location |
|---|---|---|
| CocoaPods | Pods/PDFNet/Resources/Tools-Localization/<language-code>.lproj | Xcode |
| Manual | Lib/Tools/src/PDFViewCtrlTools/Tools/<language-code>.lproj | Downloaded package |
These files contain the key-value pairs which are used to define the user-facing
strings in Tools and are for reference only — modifying them has no effect.
You can add any of the keys to your PTLocalizable.strings file and define a custom
value to display to the user.
This method is not recommended as it involves editing the Tools.framework strings
file directly which will create a requirement to manually merge strings files when
updating to new versions of Tools.framework.
If you are manually compiling the Tools.framework from source, localization can
be performed by following these steps:
Select the Tools project from the Project navigator.
Select the Tools project from the dropdown or list of projects and targets.
Add a new localization by clicking on the plus sign below 'Localizations'.

Check the box next to the file for the new localization (the Localizable.strings file) and click 'Finish'.

A new Localizable.strings file will be created in /Lib/Tools/src/PDFViewCtrlTools/Tools/<language-code>.lproj with the contents of the reference language (English by default). You can then enter a translation on the right-hand side of each entry in the .strings file.
Trial setup questions? Ask experts on Discord
Need other help? Contact Support
Pricing or product questions? Contact Sales