effrenus / yandex-map-react

70 stars 22 forks source link

Language support #54

Closed kachkaev closed 6 years ago

kachkaev commented 6 years ago

I'm curious if there is a way to change language for the controls such as this one:

screen shot 2018-06-11 at 12 33 50

I tried injecting the language into the state (which generally works), but this gave no effect:

const mapState = {
  behaviors: ['drag', 'dblClickZoom', 'multiTouch', 'rightMouseButtonMagnifier'],
  controls: ['zoomControl', 'typeSelector'],
  // language: "en",
  // lang: "en",
  // lang: "en_US",
};

<Map width={...} height={...} state={mapState} />

Any ideas?

kachkaev commented 6 years ago

Upd: setting <Map loadOptions={{ lang: "en" }} ... /> did help!