**European Economic Area (EEA) developers**

> [!NOTE]
> If your billing address is in the European Economic Area, effective on 8 July 2025, the [Google Maps Platform EEA Terms of Service](https://cloud.google.com/terms/maps-platform/eea) will apply to your use of the Services. Functionality varies by region. [Learn more](https://developers.google.com/maps/comms/eea/faq.md.txt).

Localized response values are an additional response field that provides localized text for
returned parameter values. Localized text is provided for trip duration, distance, and unit
system (metric or imperial). You request localized values using a field mask, and can either
specify the language and unit system or use the values inferred by the API. For details, see
[LocalizedValues](https://developers.google.com/maps/documentation/javascript/reference/route.md.txt#Route.localizedValues).

For example, if you specify a language code for German (de) and imperial units, you get a value
for `distanceMeters` of 49889.7, but also localized text providing that distance
measurement in German and imperial units, so "31 Meile."

> [!NOTE]
> Note: You get two values for the expected duration: `duration` uses the traffic model you specify, and `staticDuration` does not take traffic into account. So, if your requested traffic model is `TRAFFIC_UNAWARE` these times are identical.

To request localized values, take the following steps:

1. Add the `localizedValues` field to the `fields` property of the [`ComputeRoutesRequest`](https://developers.google.com/maps/documentation/javascript/reference/route.md.txt#ComputeRoutesRequest).
2. Optionally, specify the language and unit system using the `languageCode` and `units` properties of the `ComputeRoutesRequest`.

Here is an example of requesting localized values:

```javascript
const requestWithLocalizedValues = {
  origin: 'San Diego, CA',
  destination: 'Ensenada, MX',
  travelMode: 'DRIVING',
  language: 'es',
  units: google.maps.UnitSystem.METRIC,
  fields: ['path', 'localizedValues', 'distanceMeters', 'durationMillis'],
};
  
```

If you don't specify the language or unit system, the `computeRoutes` method infers
the location and distance units from the origin waypoint. So for a routing request in the US,
the API infers `en-US` language and `IMPERIAL` units.

To read localized values use `route.localizedValues`. For example:

```javascript
const localizedValues = route.localizedValues;
const distance = localizedValues.distanceMeters;
const duration = localizedValues.duration;
const durationStatic = localizedValues.staticDuration;
  
```