---
title: "getLocale"
slug: "api/session/operations/getlocale"
sidebar:
  order: 150
---

<a id="ref-490b15cd3365"></a>
<a id="ref-700e07b59315"></a>
<a id="ref-92e0e3bd1e34"></a>

## Synopsis

```text
string getLocale(
    string sessionId,
    boolean withTimeZone
) throws SessionServiceFault;
```

See also: [SessionServiceFault](/pCon/configuratorOnline/specs/api/session/faults/sessionservicefault#ref-30a5c7817f4a)

Optional parameter 'withTimeZone' (type boolean).

If this parameter is true, the return value consists of the locale name and time-zone ID, separated by a comma.

A [`SessionServiceFault`](/pCon/configuratorOnline/specs/api/session/faults/sessionservicefault) is returned if any of the following conditions occurs:

- The `sessionId` parameter is not a valid string representation of an UUID or does not represent an open session.
