moaazsidat / react-native-qrcode-scanner

A QR code scanner component for React Native.
MIT License
2.04k stars 516 forks source link

iOS camera permission description language localisation #361

Open WenLonG12345 opened 2 years ago

WenLonG12345 commented 2 years ago

image

Hi, I am recently working on this library and I found that all the permission customisation is working well in Android. However, I didn't found any customisation for iOS permission dialog.

I want to change Camera Permission's description to Chinese. Can anyone guide me out which props should I used?

Here is my approach

<QRCodeScanner
        onRead={onRead}
        ref={scannerRef}
        showMarker
        fadeIn={false}
        customMarker={<View style={styles.rectangle} />}
        cameraStyle={styles.cameraContainer}
        permissionDialogTitle={translate('info')}
        permissionDialogMessage={translate('need_camera_permission')}
        buttonPositive={translate('ok')}
        cameraProps={{
          notAuthorizedView:
            <View style={styles.alert}>
              <Text>{translate('camera_not_authorized')}</Text>
            </View>
        }}
        notAuthorizedView={
          <View style={styles.alert}>
            <Text>{translate('camera_not_authorized')}</Text>
          </View>
        }
/>