Languages - API Client JS

The MapTiler API Client JS has a built-in list of supported languages, which can be used as shorthand for the ISO language codes used to define the language of the map labels, geocoding control, etc.

Check out the complete list of supported languages. In addition to the built-in ISO languages, there are these special cases for supported languages:

  • Language.AUTO: Language mode to display the labels in the end user’s device language.
  • Language.LATIN: The OSM language using latin script. MapTiler discourages its use as a primary language setting due to the lack of actual linguistic specificity, though it can be an handy fallback. This is not to be confused with the “Classical Latin” language, which is available under the tag .CLASSICAL_LATIN.
  • Language.NON_LATIN: The OSM language using non-latin script. MapTiler discourages its use as a primary language setting due to the lack of actual linguistic specificity, though it can be an handy fallback.
  • Language.LOCAL: Using the local language generally (but not always) means that every labels of a given region will use the dominant local language.

Here are one example of using the language with the geocoding function:

const result = await maptilerClient.geocoding.forward('bordeaux', {
  language: [maptilerClient.Language.SPANISH, maptilerClient.Language.ENGLISH]
}));