You can customize the language and region settings used in your map by changing
the default language settings and the map's region code, which can affect the
behavior of the map based on the specified country or territory.

See the coverage for Maps 3D SDK for Android in the
[Maps coverage table](https://developers.google.com/maps/coverage.md.txt).

## Language localization

By default, the Maps 3D SDK for Android uses the language settings configured on the
user's device to determine which translation of the map to display. However, you
can override this default behavior and set a specific language when initializing
the map, or update the language and region dynamically after the map is
initialized.

Setting the language affects the language that UI controls, tooltips, and
copyright notices are displayed in. Runtime locale updates are reflected in the
map view, but not any of the other UI controls, tooltips, or other such
elements. It also affects the translation of political features, descriptors,
and natural features---such as changing "Geneva" to "Genève" or "lake" to
"lac"---and changes the direction that text is rendered for
right-to-left scripts.

The Maps 3D SDK for Android looks for localization preferences in the following
order. If preferences aren't defined at the first step, then it continues
looking in the specified order:

1. **Runtime updates** : Language and region preferences passed to [`setLocale`](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/GoogleMap3D.md.txt#setLocale(com.google.android.gms.maps3d.model.LocaleOptions)) on your [`GoogleMap3D`](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/GoogleMap3D.md.txt) instance using [`LocaleOptions`](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LocaleOptions.md.txt).
2. **Map initialization** : Language and region preferences specified when creating the map, either in your layout XML on [`Map3DView`](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/Map3DView.md.txt) using the `map3d:language` and `map3d:region` attributes, or programmatically using [`Map3DInitConfig`](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/Map3DInitConfig.md.txt).
3. **Device settings**: The system default locale configured on the Android device.

The following example displays a map in Chinese (`"zh"`) and sets the region to
China (`"CN"`).

You can configure the language and region in your layout XML file using the
`map3d:language` and `map3d:region` attributes on
[`Map3DView`](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/Map3DView.md.txt):

```xml
<com.google.android.gms.maps3d.Map3DView
    android:id="@+id/map3dView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    map3d:mapMode="hybrid"
    map3d:language="zh"
    map3d:region="CN" />
```

You can also update the language and region dynamically at runtime by creating a
[`LocaleOptions`](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LocaleOptions.md.txt)
instance, setting the values with
[`setLanguage`](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LocaleOptions.md.txt#setLanguage(java.lang.String))
and
[`setRegion`](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LocaleOptions.md.txt#setRegion(java.lang.String)),
and passing it to
[`setLocale`](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/GoogleMap3D.md.txt#setLocale(com.google.android.gms.maps3d.model.LocaleOptions))
on your
[`GoogleMap3D`](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/GoogleMap3D.md.txt)
instance:

```kotlin
val localeOptions = LocaleOptions().apply {
    language = "zh"
    region = "CN"
}
googleMap3D.setLocale(localeOptions)
```

## Region localization

Setting the region using the `map3d:region` XML attribute, the
[`region`](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/Map3DInitConfig.md.txt#getRegion())
property on
[`Map3DInitConfig`](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/Map3DInitConfig.md.txt),
or
[`setRegion`](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LocaleOptions.md.txt#setRegion(java.lang.String))
on
[`LocaleOptions`](https://developers.google.com/maps/documentation/maps-3d/android-sdk/reference/com/google/android/gms/maps3d/model/LocaleOptions.md.txt)
can serve different map tiles or bias the application towards more
regionally appropriate results. Additionally, setting the region tag ensures
that the application complies with local laws by applying the correct regional
localization for the country or territory where the application is distributed.