Hello Guys, i am working on Localization in my app...
# android
q
Hello Guys, i am working on Localization in my app, currently we have two languages "English, Arabic". Locale is not working api level 33 and below this working fine. when i am trying to switch locale, the layout is changed but every time app reads english strings.xml even the local is arabic. Any one have idea how to fix it? Thanks #android-studio #android
not kotlin but kotlin colored 4
d
Check the country code coming and is it mapping to your xml file Most probably it wont and you need to add string break for your code so that country code will map with the xml
q
@Killian yes bro, i am used per app language but same issue. arabic string not readable . let me share screenshot
this is the issue.
b
How are switching locale? Do you have string buckets setup properly?
q
@brandonmcansh yes brother string buckets setup is fine, i figure out the issue . Everything time android studio reads english string.xml file. even on locale change. if i am copy and paste arabic string.xml into english then i will read so that means its not reading res values-ar string.xml file.
b
i have this working in production for other languages; have you tried a different locale other than arabic?
q
@brandonmcansh i am able to fix the locale issue but now i am facing one more issue. when i am restarting the activity then we face a blink on restart the app. using System.exit(0).. we dont want blink. 2: if i am trying to just recreate the activity then it will hang on composable splash screen. do you have any idea how to fix blink or hang.