Page MenuHomePhabricator

Allow app language to always match device language
Closed, ResolvedPublic



By default, the Wikipedia app language is set to match the device language when the app is first installed/launched. However, if the user changes the language on the phone after installing and using the app, the app language does not change to match the new choice.


The app will default to the device’s language when the device’s language changes

Event Timeline

AMuigai created this task.Apr 8 2020, 1:19 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 8 2020, 1:19 PM
AMuigai moved this task from Backlog to Kanban on the Inuka-Team board.Apr 9 2020, 10:55 AM
AMuigai edited projects, added Inuka-Team (Kanban); removed Inuka-Team.
hueitan claimed this task.Apr 15 2020, 9:49 AM
hueitan moved this task from Ready for Dev to Dev on the Inuka-Team (Kanban) board.

A possible user workflow

  1. User install the app, device language en
  2. Open the app, it's on device language en
  3. User changes the app language to de
  4. Close the app
  5. Open again the app, it's still on de
  6. Close the app
  7. User changes the device language to fr
  8. Open the app, it's on device language fr

To clarify what is "Close the app", it has two scenarios

  1. app running in the background after closing
  2. exit the app completely

TBD whether we apply the device language change in both scenerios, here's my option of the dev implementation

  1. for 1st scenario, detect the device language changes when the event listener visiblitychange is not hidden, that also means require language state for every page and listen to the device language change. (more complex in some page, for example in the search page when we have the query Cat, when the device language change we need to update app language and both search language)
  2. for the 2nd, only detect the device language changes when the app is "freshly" open (term freshly - new session)

The decision is covering only the 2nd scenario.

SBisson moved this task from Code Review to QA on the Inuka-Team (Kanban) board.Apr 16 2020, 3:27 PM
Jpita moved this task from QA to Design sign off on the Inuka-Team (Kanban) board.Apr 20 2020, 8:15 AM

@hueitan this is working fine on Jio devices. I needed to install the app couple of times on Banana phone to get it right as the app was displaying like below-attached images. This case was mostly happening when before installing the app device language was set to other than English. I am not sure if this is related to this ticket or not, but I thought of putting it here as I didn't notice this earlier.

SBisson added a subscriber: SBisson.EditedApr 20 2020, 6:39 PM

@SGautam_WMF this is pretty bad (but pretty good that you found it). Are you able to reproduce this issue? And if so, could you share what you are doing in details?

EDIT: I saw it too just now!

I saw it too! while trying in the different browser (chrome in my case), I can see it.

The hotfix (or other naming?) is here

Once this PR is merged, please test it again.

Thanks for finding the edge case here @SGautam_WMF

Ok, @hueitan I will wait for the PR to be merged.

Jpita added a subscriber: Jpita.Apr 21 2020, 7:16 AM

Weird, I tried with the phone in spanish and portuguese and was working fine.
what language did you use?

I tried a couple of Indian languages including Hindi.

ok, must be a language that the app is not translated to.
missed that case, sorry team

It seems to be working fine now, moving it for product signoff.

I changed the language of the phone to a RTL language on Jio 2 knowing that we do not support that in the app yet.

Expected behaviour:

  1. App defaults to English
  2. I can interact with content in English in the app
  3. I can change the article language to the languages supported by the app


  • Default seems to be English when l launched the app, but then I cannot search for content or search for language in the app menu

Moving this back for @Jpita to confirm.

@AMuigai can you tell me the RTL language you chose?

AMuigai triaged this task as Medium priority.May 14 2020, 1:38 PM

I chose Kashmiri, and it didn't work; the app worked with Urdu. Filing two bugs.

Jpita added a comment.May 16 2020, 5:27 AM

I chose Kashmiri, and it didn't work; the app worked with Urdu. Filing two bugs.

oh, you want to create new tickets and this one should go to sign off?

AMuigai closed this task as Resolved.May 20 2020, 12:21 PM

New tickets for RTL issues (related to not being supported on v1) filed to handle the pending issue here.