As already mentioned, this cannot be changed after loading the map, but for those who can afford to refresh the page, this might work:
HTML
<script type="text/javascript"> //load map based on current lang var scriptTag = document.createElement('script'); var currentLang = window.localStorage && window.localStorage.getItem('language'); var scriptSrc = '//maps.googleapis.com/maps/api/js?libraries=drawing,places&key=YOUR_KEY_HERE'; if (currentLang) scriptSrc = '//maps.googleapis.com/maps/api/js?language=' + currentLang + '&libraries=drawing,places&key=YOUR_KEY_HERE'; scriptTag.setAttribute('src', scriptSrc); scriptTag.setAttribute('async', ''); document.head.appendChild(scriptTag); </script>
Js
function changeLangAndReload(lang) { window.localStorage.setItem('language', lang); window.location.reload();
source share