Kansen Kansen - 4 months ago 18
iOS Question

Nativescript Camera Module and Default Language

In the Camera Module,
It only happens on IOS,
The value of the buttons are in English despite the fact that the device is not set in English (e.g "platform.device.language" value is fr-FR).

  • CLI: 2.1.1

  • Cross-platform modules: 2.1.0

  • Runtime(s): tns-ios version is 2.1.1

In order to create this issue it only needs to create a view which calls the takePicture()'s function from the camera module, the first screen will have a "Cancel" button on the bottom left side. Then when we take a photo, the buttons "Use Photo" and "Retake" are set by default.

Is there a way to change those buttons's values without creating a custom view ?


In your case you should change the Localization language in your project. You could follow the below described steps, where have been described, how to do that:

  1. open app/App_Resources/iOS/Info.plist file
  2. add the below add code snippet just after <dict> opening tag.

<key>CFBundleLocalizations</key> <array> <string>fr</string> </array>