# Locales

Locales are regional sub settings. Each locale is defined by a name, bounds and a set of layers.

It is possible to switch locales via the dropdown in the Layers control. The dropdown is only visible if more than one locale is defined in the workspace.

The current local is defined as a url hook. For example [https://geolytix.xyz/open/?locale=Global](https://geolytix.xyz/open/?locale=Global) will open the Global locale from the settings for the /open instance. If not defined, the first locale in the locales object will be the default.

This example shows all possible options:

```javascript
"locales": {
  "Global": {...}
  "UK": {
    "name": "United Kingdom",
    "gazetteer": {...},
    "bounds": {
      "north": 62,
      "east": 5,
      "south": 48,
      "west": -13
    },
    "showScaleBar": true,
    "maskBounds": true,
    "view": {
      "lat": 45,
      "lng": 60,
      "z": 3
    },
    "minZoom": 6,
    "maxZoom": 17,
    "layers": {...}
  }
}
```

Locales are JSON objects with a set of parameter.

The **name** value will be displayed in the locale dropdown. The locale key will be the default for the name value.

The locale's **bounds** are defined by their northern, eastern, southern and western border. The default bounds are for a global view.

Setting the **showScaleBar** entry will show a scale bar in the lower left corner of the map:

![](https://1429262937-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LMms4_qYZAl-8nd6vhU%2F-LWkN8JNgDWdB43sshG2%2F-LWkO8A5iTV23nyvLPwB%2Fimage.png?alt=media\&token=31517d39-0397-4b6f-8e21-2d7704623c35)

Setting the **maskBounds** entry will put a mask on the region which falls outside the locale bounds:

![](https://1429262937-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LMms4_qYZAl-8nd6vhU%2F-LWLeTc6yf6qynHMlADQ%2F-LWLf-CJSOhYnyXJSOrz%2Fimage.png?alt=media\&token=374213ab-eca8-4a69-a0a5-4f6139b3b208)

The **min** and **maxZoom** define the outer zoom levels for the map object. The default zoom range is from 2 to 20.

Setting the **view** with latitude (**lat**), longitude (**lng**), and zoom (**z**) will define the view which is loaded if not overridden by either the init parameter or url hooks.
