How can I translate ScrollZoomBlocker? #2144
Unanswered
skafte-develop
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to translate some of the controls I use in my React App.
I currently have this code:
<Map
mapLib={maplibregl}
initialViewState={{
latitude: REDACTED,
longitude: REDACTED,
zoom: 7.8,
dragRotate: false,
touchZoomRotate: false,
attributionControl: false,
cooperativeGestures: true,
}}
locale={{
'ScrollZoomBlocker.CtrlMessage': 'Brug ctrl + scroll for at zoome på kortet',
'ScrollZoomBlocker.CmdMessage': 'Brug ⌘ + scroll for at zoome på kortet',
'TouchPanBlocker.Message': 'Brug to fingre for at flytte kortet',
'NavigationControl.ZoomIn': 'Zoom ind',
'NavigationControl.ZoomOut': 'Zoom ud',
}}
style={{
width: '100%',
height: MapHeight || '600px',
}}
mapStyle="REDACTED"
>
<NavigationControl
position="bottom-left"
showCompass={false}
/>
</Map>
NavigationControl.ZoomIn and NavigationControl.ZoomOut works perfectly but the others don't. I also can't seem to find the src/ui/default_locale.js mentioned in the documentation.
Can someone help me?
Beta Was this translation helpful? Give feedback.
All reactions