Enter an [ x ] character to confirm the points below:
[ x ] I have read the support page and am reporting a bug or enhancement request specific to AnkiDroid
[ x ] I have checked the manual and the FAQ and could not find a solution to my issue
[ x ] I have searched for similar existing issues here and on the user forum
Application's Language set to Language DIFFERENT to System's (Screenshot - Settings). In this case - System's language - Russian, AnkiDroid - English
Start Ankidroid (from closed state, not from background)
Application should respect selected GUI language at all times
There are bugs in Application's GUI, forcing it to revert to System's language under some circumstances
AnkiDroid Version = 2.8.2
Android Version = 7.0
ACRA UUID = 97cb4c7f-7bd4-469e-86a2-ebeffa03a8f0
Can confirm, the issue still exists axactly as described. Android 7, miui 9. Latest beta from the Google play.
How very strange! I can reproduce this sometimes as well.
I have English as a system language, and I used Slovak as the test language since it appears to be 100% approved in the translations page.
I haven't tested all combos but I see this:
So this looks like a problem with Nougat (Android 7.1 / API 24+) and newer, although in all versions it could be applied more correctly immediately after language selection
Simplest reproduction is to open the app on Android 8.1, go to preferences, change to Slovak from English as a System Language, and it immediately takes me to the deck browser where the title is in English but the text at the bottom is in Slovak. Entering a deck continues to show text in English afterwards.
After some research it looks like others have the problem and there's a won't-fix ticket against Android for >= API24 related to this where people have posted workarounds and there is some recommended API usage https://issuetracker.google.com/issues/37113860
I should mention the only apparently viable workaround at the moment if you want to view AnkiDroid in a specific language and you have Android 7 or greater, is to change your system language to the desired Anki language. I recognize this is not a great recommendation, but it should work.
An extra note on this - while my Android API 27 phone didn't translate many things, the notifications were partially translated, but in the non-system language even after I changed it back. The important point being that when the language changes we probably need to cancel and re-schedule notifications with correct translations also.
Seeing the same thing.
Ankidroid language changed from default to English
Phone language switched to Mandarin Chinese (simplified characters)
Restarted phone
Expected Result
App interface completely in English
Actual Result
Some terms in English, some in Chinese.
For example, card feedback buttons are "again" in red, "困难“ in gray, "一般“ in green, and "easy" in blue.
Debug info
AnkiDroid Version = 2.8.3
Android Version = 7.1.1
ACRA UUID = abfea427-552e-4ba8-8fd3-8489d26bcda4
Issue #4700 is also related - any fix should be tested in multi-window mode as well to make sure it works there.
I took a quick look before, it seems that this line is deprecated now:
I got most of the strings to display correctly by doing something like this in AnkiActivity, but still not working in NoteEditor for some reason:
https://stackoverflow.com/questions/47165311/how-to-change-android-o-oreo-api-26-app-language
I don't think this bug has much effect on regular users as they'll tend to use the app in their system language, but the setting is pretty useful for testing crowdin translations
I don't think this bug has much effect on regular users as they'll tend to use the app in their system language, but the setting is pretty useful for testing crowdin translations
Exactly! That's when I saw it, I was going to try get Spanish all polished up but...nope :)
API17 (and then API24) changed the way locale should be accessed and deprecated the old way of directly assigning Configuration.locale as we were doing in AnkiDroidApp::setLanguage
https://developer.android.com/reference/android/content/res/Configuration.html#setLocale(java.util.Locale)
CompatV17 should use Configuration.setLocale() and (currently non-existent) CompatV24 should do Configuration.setLocales()
Then the call to update should be migrated from Resources.updateConfiguration (deprecated in API24) to https://developer.android.com/reference/android/content/Context#createConfigurationContext(android.content.res.Configuration) (added in API17)
This article is it exactly - with an added bonus that it solves activity title weirdness: https://proandroiddev.com/change-language-programmatically-at-runtime-on-android-5e6bc15c758
Yeah I read about those changes... From memory I think you need to keep the
resulting object around and use it in every activity or something like that
though, so it's by no means a simple change and I decided it wasn't worth
it for a mostly developer-only feature
On Thu., 30 Aug. 2018, 6:15 am Mike Hardy, notifications@github.com wrote:
This article is it exactly - with an added bonus that it solves activity
title weirdness:
https://proandroiddev.com/change-language-programmatically-at-runtime-on-android-5e6bc15c758—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/ankidroid/Anki-Android/issues/4729#issuecomment-417108559,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACsA4vM6rLpvNNgaa7OncsVYhQ-hdyx7ks5uVwSKgaJpZM4QWPnD
.
Thank you for looking into this issue. I just wanted to report that since upgrading to Android 8.1, changing the language doesn't do anything at all for me. The only thing that changes into the language I chose is the list of languages itself.
Just marking the 2.9 flag because I have a PR queued for this to at least "take a look". If it's too much (or too little) we can delay it
I don't think this bug has much effect on regular users as they'll tend to use the app in their system language, but the setting is pretty useful for testing crowdin translations
You're forgetting the case where there is no translation of AnkiDroid into the user's system language: such users now can't select a different preferred language, but are stuck with English -- that's how I discovered the bug.
By the way, if AnkiDroid language is set to "system default" -- and this translation doesn't exist, shouldn't it try the next language in the list of language preferences, instead of just always defaulting to English? (As of Nougat)
https://developer.android.com/guide/topics/resources/multilingual-support
@yankl - thanks for the feedback. I personally like the feature as well thus it is currently marked for the v2.9 release indicating I hope to implement it prior. I hadn't thought of the "more than one language in preference order" condition but you have a good point there as well. I'll keep it in mind either if I get to implementing this, or when I review a PR if someone takes the info I linked above showing an example modern implementation and submits a PR
Most helpful comment
@yankl - thanks for the feedback. I personally like the feature as well thus it is currently marked for the v2.9 release indicating I hope to implement it prior. I hadn't thought of the "more than one language in preference order" condition but you have a good point there as well. I'll keep it in mind either if I get to implementing this, or when I review a PR if someone takes the info I linked above showing an example modern implementation and submits a PR