Open mapmeld opened 6 years ago
Yeah the locale handoff from the OpenStreetMap Rails site to iD is tricky.. I think what is supposed to happen is
context.locale()
, with your OSM language preference:id.ui()(container)
to render iD into something:context.loadLocale()
to actually load the desired language file:setLocale()
, which sets the currentLocale
variable. It's exported and used many places (kind of like a global variable):utilDetect(true)
to redetect all the things.. It is supposed to use that currentLocale
variable to override whatever iD detected from your browser. It's also supposed to lock in LTR or RTL:I wonder if setTextDirection
should happen in setLocale
then?
I was testing out the a RTL locale (dv) in Firefox on the OpenStreetMap site. In Firefox or Chrome, you can see the same results in Arabic (ar).
I think that I missed this earlier because I was testing the locale / browser-detection code, not knowing that the text language preference can be coming from OSM user preferences. Any idea where the locale text and direction are getting mixed up?