prscX / react-native-photo-editor

React Native: Native Photo Editor
Apache License 2.0
1.12k stars 243 forks source link

Localization #156

Open bakir97 opened 3 years ago

bakir97 commented 3 years ago

Is there a way to add localization for texts? Done, save, and so on.

concatto commented 3 years ago

You can override the labels using your strings.xml which is located at android/app/src/main/res/values. The valid identifiers can be found here:

https://github.com/prscX/react-native-photo-editor/blob/master/android/src/main/res/values/strings.xml

scblason commented 2 years ago

@concatto Do you know if the same can be done in iOS and how? Thanks!

concatto commented 2 years ago

@scblason Sorry, unfortunately I have to say I don't know. I glanced over the ios folder, and couldn't find any strings there; I suspect they're defined in the iOS package itself (https://github.com/eventtus/photo-editor). I suggest you take a look there! Good luck!

prscX commented 2 years ago

@scblason: At present, there is no provision to pass literals from library JS API. We need manually make changes to below iOS .xib file. You can find this file from your xcode project nav panel. Let us know if that works for you:

https://github.com/eventtus/photo-editor/blob/30f2db6c24fd40a45f4cb2db866479e6f7be7b69/iOSPhotoEditor/PhotoEditorViewController.xib

Thanks, </ Pranav >