openmove / odh-mentor-otp

https://mobility.meran.eu
1 stars 3 forks source link

pass lang from react-ui to geocoder #44

Closed ghost closed 3 years ago

ghost commented 3 years ago

investigate how to able this in react code

pass global var lang to request https://github.com/openmove/odh-mentor-otp/blob/development/journey/app/lib/index.tpl.html#L55

stefanocudini commented 3 years ago

@valerio-fornace this is part of the i18n integration, but I could also fix it myself with your help once we have an i18n library integrated well

stefanocudini commented 3 years ago

TODO add new lang param to the requests: https://github.com/openmove/odh-mentor-otp/blob/fornace/journey/app/lib/otp-ui/geocoder/geocoders/pelias.js#L32

@valerio-fornace this is something I could do, but I need you to add in the comments as I can retrieve the value of the currently selected language example 'it', 'en'

valerio-fornace commented 3 years ago

@stefanocudini take a look to this file to check how i18n works: https://github.com/openmove/odh-mentor-otp/blob/fornace/journey/app/lib/components/form/date-time-preview.js