Localization
PhotoEditor SDK for React Native provides full control over all strings used inside the editor. However, localization needs to be implemented natively for each of the platforms.
iOS#
While you have several ways to localize the editor in iOS, the recommended way is to provide a localization dictionary that is available natively for the PESDK
class:
First, you need to import the RNPhotoEditorSDK
header inside your AppDelegat.m
/AppDelegate.mm
file:
#import <RNPhotoEditorSDK/RNPhotoEditorSDK.h>
Then, you can set the localization dictionary before the editor is opened. We recommend placing the code inside the didFinishLaunchingWithOptions
function in the same file.
[PESDK setLocalizationDictionary: @{@"en": @{@"pesdk_transform_title_name": @"Crop",@"pesdk_adjustments_title_name": @"Correct",@"pesdk_adjustments_button_reset": @"Clear"}}];
Android#
For Android, you will need to override the corresponding values inside your strings.xml
file. You can find all available strings inside our demo repository.
<resources><string name="app_name">CatalogUI</string><!-- Strings for IMG.LY SDKs. --><string name="pesdk_transform_title_name">Crop</string><string name="pesdk_adjustments_title_name">Correct</string><string name="pesdk_adjustments_button_reset">Clear</string></resources>