loggingroads / logging-roads

The Logging Roads project is a joint initiative of Global Forest Watch and Moabi to monitor the spread of logging roads across the Congo Basin.
http://loggingroads.org
MIT License
4 stars 2 forks source link

Enable UI translation in iD editor #50

Closed thomas-maschler closed 9 years ago

thomas-maschler commented 9 years ago

iD editor has a translated interface. It normally fetches the user settings from OSM and uses user's preferred language. This doesn't work for our iD instance. Everything stays in English

kriscarle commented 9 years ago

When iD is running on its own (not inside OSM's homepage) it uses the computer language settings not the OSM profile settings. I was able to get the logging roads iD to change languages by changing the primary language of my computer to French, restarting Chrome, then going to Settings -> Advanced Settings -> Languages and dragging French to the top of the list. (other browsers have similar settings).

image

kriscarle commented 9 years ago

For iD to use the preferred order of languages from the browser, instead of the primary computer language, it would need to be updated to use navigator.languages instead of navigator.language, see https://alicoding.com/detect-browser-language-preference-in-firefox-and-chrome-using-javascript/

kriscarle commented 9 years ago

Fixed in https://github.com/loggingroads/iD/commit/33fffec505c8c34552934ba1dba5c8fccb4a7e3e