<!--
{
  "availability" : [
    "MapKit JS: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MapKitJS",
  "identifier" : "/documentation/MapKitJS/MapKitInitializationOptions/language",
  "metadataVersion" : "0.1.0",
  "role" : "Interface Property",
  "symbol" : {
    "kind" : "Interface Property",
    "modules" : [
      "MapKit JS"
    ],
    "preciseIdentifier" : "structp/mapkit.MapKitInitializationOptions/language"
  },
  "title" : "language"
}
-->

# language

An ID that indicates the preferred language to use when displaying map labels, controls, directions, and other text.

```
language?: string | null;
```

## Discussion

The language ID lets you indicate the language to use for displaying map labels, controls, error messages, and search and directions text. A language ID consists of a language designator followed by an optional region or script designator. Some examples of language IDs are:

- `de` (German)
- `es-MX` (Mexican Spanish)
- `zh-Hans` (simplified Chinese)
- `es` (Spanish)

If the language ID is invalid or missing, MapKit JS uses the language that the user’s browser specifies. If MapKit JS doesn’t support the preferred language, the language defaults to English.

For more information about language IDs, see [Internationalization and Localization Guide](https://developer.apple.com/library/ios/documentation/MacOSX/Conceptual/BPInternational/LanguageandLocaleIDs/LanguageandLocaleIDs.html).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)