Skip to main content

Localization

The VideoEditor SDK for iOS can be localized easily. Learn how to quickly set up your editor in the proper language for your target audience.

The VideoEditor SDK is fully localizable. We provide an English fallback localization, that will be used when no matching localization is found. To determine the matching language, VideoEditor SDK uses NSLocale.preferredLanguages. To add support for a language, please refer to Apple's localization guidelines. We also provide two properties to customize your localization, VESDK.localizationDictionary and VESDK.localizationBlock.

Localization File#

The first method to localize the SDK is to create Localizable.strings files for the languages you want to support and include the localization keys found in the SDK's Localizable.strings file and their corresponding updated values. To create the desired Localizable.strings files, please refer to Apple's localization guidelines.

Localization Dictionary#

The second method to add another language is to set VESDK.localizationDictionary to a dictionary containing your localizations. The key of the dictionary needs to be the locale that you want to add, the value should be another dictionary containing the localization keys and the corresponding localized strings as values. All available localization keys are defined in the Localizable.strings file. An example for the German language might look like this:

VESDK.localizationDictionary = [
"de": [
"No permission": "Keine Berechtigung",
"Top left cropping area": "Zuschneidebereich oben links",
"Settings": "Einstellungen"
]
]

Localization Closure#

The more advanced way to add localization is passing a closure, which will be called for each string that can be localized. You can then use that closure to look up a matching localization in your app's Localizable.strings file or do something completely custom. An example might look like this:

VESDK.localizationBlock = { stringToLocalize in
return NSLocalizedString(stringToLocalize, comment: "")
}

Localizable.strings#

A list of strings that are used in the SDK is available within the framework's bundle at ImglyKit.framework/ImglyKit.bundle/en.lproj/Localizable.strings. The contents of that file are in binary format. To convert them back into a readable format please use the following command:

bash
plutil -convert xml1 ImglyKit.framework/ImglyKit.bundle/en.lproj/Localizable.strings