Page MenuHomePhabricator

Expand Android app to support more localized content/input
Closed, ResolvedPublic

Description

Font rendering and text input (e.g. for search) work for the languages & scripts supported in the device. Default language is the one used in the device.
Registered user can change preferred language in Settings.

First filed at: https://github.com/nitobi/Wikipedia/issues/14


Version: 1.0.0 (Android)
Severity: enhancement

Details

Reference
bz31457

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:52 PM
bzimport set Reference to bz31457.

'The URL could not be found. (http://en-us.m.wikipedia.org/)' .... not so good perhaps :)

herman.wong wrote:

can you provide some more details on how you were able to get it to build the url with the "en-us"?

was it on initial load of a new build? which browser are you using?

on the app's initial load (if the user hasn't set a locale before) the app uses navigator.language to determine the language code to use when building out the url. in the default android browser (android 2.3.6) it is returning "en".

when the locale is changed in the settings it is using the code property of the locale which is returned in the api call from http://en.wikipedia.org/w/api.php?action=sitematrix&format=json

herman.wong wrote:

it looks like some browsers return "en-us" or 'en_US" instead of just the "en" when using the navigator.language API.

herman.wong wrote:

https://github.com/nitobi/Wikipedia/commit/5b3c339c51a96bf7375d56008f48ac86be6cf533

added a method that removes the country code from navigator.language