rosetta icon indicating copy to clipboard operation
rosetta copied to clipboard

Language doesn't change immediately

Open Arkar-Aung opened this issue 8 years ago • 12 comments

After choosing language from ChangeLanguageDialog, language doesn't change immediately. But it changes in next app launch after killing the current app.

Arkar-Aung avatar Feb 03 '17 04:02 Arkar-Aung

Hello @Arkar-Aung, I'm sorry but I could not reproduce the issue. Could you please give me more context of the problem, the logs for example?

iamjazzar avatar Feb 13 '17 10:02 iamjazzar

@ahmedaljazzar It's okay if I use directly setLocale(locale, context). Restart activity with correct language. But when I use ChangeLanguageDialog, restart activity with current language. Nothing has changed. Still showing current language in language dialog in next time activity launch.

Arkar-Aung avatar Feb 14 '17 06:02 Arkar-Aung

I'm sorry I tried the dialog, but it seems it's working fine. Could you give me the logging information?

iamjazzar avatar Feb 24 '17 11:02 iamjazzar

I had the same problem on Android 4 @ahmedaljazzar It Saves correctly but when you relaunch the activity still has the same strings

D/com.ahmedjazzar.rosetta.LanguagesListDialogFragment: Displaying dialog main strings in the selected locale
D/com.ahmedjazzar.rosetta.LanguagesListDialogFragment: Displaying dialog main strings in the selected locale
I/com.ahmedjazzar.rosetta.LocalesDetector: Locale preferences updated to: es
I/com.ahmedjazzar.rosetta.LanguagesListDialogFragment: App locale changed successfully.
D/com.ahmedjazzar.rosetta.LocalesDetector: Refreshing the application: appli.example.com.dev
D/com.ahmedjazzar.rosetta.LocalesDetector: Finishing current activity.
D/com.ahmedjazzar.rosetta.LocalesDetector: Start the application
D/com.ahmedjazzar.rosetta.LocalesDetector: Application refreshed

llleodeleon avatar Mar 29 '17 09:03 llleodeleon

It works fine on Android 5 and on

llleodeleon avatar Mar 29 '17 09:03 llleodeleon

Thanks @leodeleon22, I'll start working on this issue soon.

iamjazzar avatar Mar 29 '17 09:03 iamjazzar

@ahmedaljazzar I'm working on a language learning app, this feature is really important to me. If you want we can discuss and see how can I help to fix this issue. Thanks

llleodeleon avatar Mar 29 '17 09:03 llleodeleon

@ahmedaljazzar Do you have any quick fix in mind that I can try on android 4?

llleodeleon avatar Mar 29 '17 09:03 llleodeleon

Pull requests are always welcomed @leodeleon22, I still have nothing in mind, and I was planning to work on this in the next weekend. So yes please, if you could help, it'd be appreciated.

iamjazzar avatar Mar 29 '17 09:03 iamjazzar

I've cloned the repo and updated some dependencies, I'm gonna work on it today. Thanks for the fast answer

llleodeleon avatar Mar 29 '17 09:03 llleodeleon

Waiting for it, thanks @leodeleon22.

iamjazzar avatar Mar 29 '17 09:03 iamjazzar

I had a similar problem, but when I manually set locales instead of automatically identifying the language, the issue was solved. Please check if that helps.

shahimclt avatar Oct 24 '17 07:10 shahimclt