Search code examples
javaandroidlocalizationzxingbarcode-scanner

CaptureActivity Changes Locale of the application(zxing barcode scanner)


I'm developing a multi-lang app which lets the user choose the preferred language from the setting menu.It works fine everywhere.But something which is the problem is that I integrated zxing in my applications as an standalone barcode scanner,So I'll be able to change the string resource values for different languages,but when I start the CaptureActivity,the locale changes to English in my application,So I have to relaunch the app to have the previous saved language.I couldn't find out the problem,please help me solve this issue. The link for integration process is the following:

Integrating ZXing in your Android App as standalone scanner

Any hints will be appreciated Thanks in advance


Solution

  • You have to change the current locale using SharedPreferences or any other method... and check the locale and apply it at the starting of every activity and its onResume method...