<div class="meta" robots="noindex">

</div>

Class

# Xojo.Core.Locale

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2020r2. Please use `Locale</api/os/locale>` as a replacement.

</div>

## Description

Used to represent a locale, which describes linguistic, cultural and other locale-specific information. For example, a locale might specify "English as spoken in the United States, using the metric system".

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                                                    | Type                         | Read-Only | Shared |
|---------------------------------------------------------|------------------------------|-----------|--------|
| `CurrencySymbol<xojo.core.locale.currencysymbol>`       | `Text</api/deprecated/text>` | ✓         |        |
| `Current<xojo.core.locale.current>`                     | `Locale</api/os/locale>`     | ✓         |        |
| `DecimalSeparator<xojo.core.locale.decimalseparator>`   | `Text</api/deprecated/text>` | ✓         |        |
| `GroupingSeparator<xojo.core.locale.groupingseparator>` | `Text</api/deprecated/text>` | ✓         |        |
| `Identifier<xojo.core.locale.identifier>`               | `Text</api/deprecated/text>` | ✓         |        |
| `Raw<xojo.core.locale.raw>`                             | `Locale</api/os/locale>`     | ✓         |        |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                         | Parameters                                           | Returns | Shared |
|----------------------------------------------|------------------------------------------------------|---------|--------|
| `Constructor<xojo.core.locale.constructor0>` | localeIdentifier As `String</api/data_types/string>` |         |        |

## Property descriptions

<div id="xojo.core.locale.currencysymbol">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Xojo.Core.Locale.CurrencySymbol

**CurrencySymbol** As `Text</api/deprecated/text>`

The locale's currency symbol.

This property is read-only.

Get the locale's currency symbol:

``` xojo
Var locale As New Xojo.Core.Locale("en-US")

Var symbol As Text
symbol = locale.CurrencySymbol
```

<div id="xojo.core.locale.current">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Xojo.Core.Locale.Current

**Current** As `Locale</api/os/locale>`

The user's current locale. For web apps, this is the locale of the server. To get the locale of the browser, use `WebSession<websession.languagecode>`.

This property is read-only.

Get the current locale:

``` xojo
Var currentLocale As Xojo.Core.Locale
currentLocale = Xojo.Core.Locale.Current
```

<div id="xojo.core.locale.decimalseparator">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Xojo.Core.Locale.DecimalSeparator

**DecimalSeparator** As `Text</api/deprecated/text>`

The locale's separator between the integer and decimal portions of a number. In "un-US", this is the 'period'.

This property is read-only.

Get the locale's decimal separator:

``` xojo
Var locale As New Xojo.Core.Locale("en-US")

Var decimal As Text
decimal = locale.DecimalSeparator
```

<div id="xojo.core.locale.groupingseparator">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Xojo.Core.Locale.GroupingSeparator

**GroupingSeparator** As `Text</api/deprecated/text>`

The locale's separator for grouping a number. In "en-US", this is the 'comma' placed between every three integer digits.

This property is read-only.

Get the locale's grouping separator:

``` xojo
Var locale As New Xojo.Core.Locale("en-US")

Var grouping As Text
grouping = locale.GroupingSeparator
```

<div id="xojo.core.locale.identifier">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Xojo.Core.Locale.Identifier

**Identifier** As `Text</api/deprecated/text>`

This is the locale's identifier. The identifier may not exactly match the identifier passed in via the constructor due to conversions (e.g. 'en_US' could become 'en-US').

This property is read-only.

Get the locale's identifier:

``` xojo
Var locale As New Xojo.Core.Locale("en-US")

Var id As Text
id = locale.Identifier
```

<div id="xojo.core.locale.raw">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Xojo.Core.Locale.Raw

**Raw** As `Locale</api/os/locale>`

A machine-independent locale that has a well-defined format (i.e. the POSIX locale) and is not affected by the user's settings.

This property is read-only.

Get the raw locale:

``` xojo
Var currentLocale As Xojo.Core.Locale
currentLocale = Xojo.Core.Locale.Raw
```

## Method descriptions

<div id="xojo.core.locale.constructor0">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

Xojo.Core.Locale.Constructor

**Constructor**(localeIdentifier As `String</api/data_types/string>`)

<div class="note">

<div class="title">

Note

</div>

`Constructors</api/language/constructor>` are special methods called when you create an object with the `New</api/language/new>` keyword and pass in the parameters above.

</div>

Creates a locale with the given localeIdentifier.

As an example, "en-US" is used as a localeIdentifier for English in the United States.

<div class="warning">

<div class="title">

Warning

</div>

A `RuntimeException</api/exceptions/runtimeexception>` will be raised if an invalid localeIdentifier is passed.

</div>

Links to look up codes: \* The two-letter [ISO 639-1 standard](http://www.loc.gov/standards/iso639-2/php/English_list.php) \* [ISO Online Browsing Platform](https://www.iso.org/obp/ui/#search) \* [ISO Language Code Table](http://www.lingoes.net/en/translator/langcode.htm) \* [International Components for Unicode](http://demo.icu-project.org/icu-bin/locexp)

Create an English US locale:

``` xojo
Var locale As New Xojo.Core.Locale("en-US")
```

## Notes

For web apps, this returns the locale of the app running on the server. To get the locale of the connected user from the browser use `WebSession<websession.languagecode>`.

For more information on localization, refer to the Localization topic .

## Compatibility

All project types on all supported operating systems.

## See also

`Object</api/data_types/additional_types/object>` parent class; `DateTime</api/data_types/datetime>` class
