gev2002 / react-native-vision-camera-text-recognition

https://www.npmjs.com/package/react-native-vision-camera-text-recognition
MIT License
45 stars 7 forks source link

Change options for translating text #10

Closed HamzaReza closed 3 months ago

HamzaReza commented 3 months ago

Can we change the "from" and "to" option on runtime?

<RnCamera
style={styles.camera}
device={device}
isActive
options={{
from: fromLanguageValue,
to: toLanguageValue,
}}
mode={'translate'}
callback={d => setData(d)}
/>

I am trying to change the from language and to language from a dropdown but camera is not picking the new updated language. No matter which language I select, it always translate to german (which is the default one if no options are being passed to camera)

https://github.com/user-attachments/assets/e431c4e9-b796-417f-9fe8-a23e57990289

minhaz19 commented 3 months ago

+1

gev2002 commented 3 months ago

@HamzaReza Hi, becouse language you can pass only on init Camera, pass it in runtime it can slow down performance. If you want do it runtime I can create package like you want.

HamzaReza commented 3 months ago

@HamzaReza Hi, becouse language you can pass only on init Camera, pass it in runtime it can slow down performance. If you want do it runtime I can create package like you want.

If it is possible for you to do it, I would be thankful.

gev2002 commented 3 months ago

You can write about that, to my gmail. gev.avet.02@gmail.com