title: Google geolocation get same data in different languages
body: <p>I am using following code from Googles API in a Register/login script, to get the address of the user:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var placeSearch, autocomplete;
  var componentForm = {
    route: 'long_name',
    street_number: 'short_name',
    postal_code: 'short_name',
    locality: 'long_name',
    administrative_area_level_1: 'long_name',
    country: 'long_name'
  };
  
  function initAutocomplete() {
    // Create the autocomplete object, restricting the search to geographical
    // location types.
    autocomplete = new google.maps.places.Autocomplete(
        /** @type {!HTMLInputElement} */(document.getElementById('autocomplete')),
        {types: ['geocode']});
  
    // When the user selects an address from the dropdown, populate the address
    // fields in the form.
    autocomplete.addListener('place_changed', fillInAddress);
  }
  
  // [START region_fillform]
  function fillInAddress() {
    // Get the place details from the autocomplete object.
    var place = autocomplete.getPlace();
    
    /*document.getElementById('place_id').value = place.place_id;
    document.getElementById('place_id').disabled = false;*/
  
    for (var component in componentForm) {
      document.getElementById(component).value = '';
      /*document.getElementById(component).disabled = false;*/
    }
  
    // Get each component of the address from the place details
    // and fill the corresponding field on the form.
    for (var i = 0; i &lt; place.address_components.length; i++) {
      var addressType = place.address_components[i].types[0];
      if (componentForm[addressType]) {
        var val = place.address_components[i][componentForm[addressType]];
        document.getElementById(addressType).value = val;
      }
    }
  }
  // [END region_fillform]
  
  // [START region_geolocation]
  // Bias the autocomplete object to the user's geographical location,
  // as supplied by the browser's 'navigator.geolocation' object.
  function geolocate() {
    if (navigator.geolocation) {
      navigator.geolocation.getCurrentPosition(function(position) {
        var geolocation = {
          lat: position.coords.latitude,
          lng: position.coords.longitude
        };
        var circle = new google.maps.Circle({
          center: geolocation,
          radius: position.coords.accuracy
        });
        autocomplete.setBounds(circle.getBounds());
      });
    }
  }
  // [END region_geolocation]</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;label class="tooltip" for="autocomplete"&gt;Hier Adresse eingeben:&lt;/label&gt;
           &lt;input type="text" id="autocomplete" placeholder="Adresse hier eingeben" onFocus="geolocate()" /&gt;
                  &lt;label for="street_number"&gt;Strasse / Hausnummer:&lt;/label&gt;
                  &lt;input type="text"  name="form_street" id="route" readonly       placeholder="Strasse wird automatisch ausgefüllt" /&gt;
                  &lt;input type="text"  name="form_street_number" id="street_number" readonly /&gt;
                  &lt;label  for="locality"&gt;PLZ / Stadt:&lt;/label&gt;
                  &lt;input type="text"  name="form_postal_code" id="postal_code" readonly placeholder="PLZ autom. ausgefüllt" /&gt;
                  &lt;input type="text"  name="form_town" id="locality" readonly  placeholder="Ort wird automatisch ausgefüllt" /&gt;
                  &lt;label  for="administrative_area_level_1"&gt;Bundesland:&lt;/label&gt;
                  &lt;input type="text"  name="form_state" id="administrative_area_level_1" readonly placeholder="Bundesland wird automatisch ausgefüllt" /&gt;
                  &lt;label for="postal_code"&gt;Land:&lt;/label&gt;
                  &lt;input type="text" name="form_country" id="country" readonly placeholder="Land wird automatisch ausgefüllt" /&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Everything works fine. My Question: Is there a possibility to get country, state, town in other languages at the same time? I want to put it in hidden fields and store it in database. I cant put my api key into the code snippet so it wont work here, but at home it works fine.</p>
  
  <p>Thank you,</p>
  
  <p>Michael</p>