[locale.statics]

# 28 Text processing library [[text]](./#text)

## 28.3 Localization library [[localization]](localization#locale.statics)

### 28.3.3 Locales [[locales]](locales#locale.statics)

#### 28.3.3.1 Class locale [[locale]](locale#statics)

#### 28.3.3.1.6 Static members [locale.statics]

[ð](#lib:locale,global)

`static locale global(const locale& loc);
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L1124)

*Effects*: Sets the global locale to its argument[.](#1.sentence-1)

Causes future calls to the constructor locale() to return a copy of the argument[.](#1.sentence-2)

If the argument has a name, doessetlocale(LC_ALL, loc.name().c_str()); otherwise, the effect on the C locale, if any, isimplementation-defined[.](#1.sentence-3)

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L1136)

*Returns*: The previous value of locale()[.](#2.sentence-1)

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L1140)

*Remarks*: No library function other than locale​::​global() affects the value returned by locale()[.](#3.sentence-1)

[*Note [1](#note-1)*:

See [[c.locales]](c.locales "28.3.5 C library locales") for data race considerations
when setlocale is invoked[.](#3.sentence-2)

â *end note*]

[ð](#lib:locale,classic)

`static const locale& classic();
`

[4](#4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L1156)

The "C" locale[.](#4.sentence-1)

[5](#5)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L1159)

*Returns*: A locale that implements the classic "C" locale semantics,
equivalent to the value locale("C")[.](#5.sentence-1)

[6](#6)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/text.tex#L1164)

*Remarks*: This locale, its facets, and their member functions, do not change with time[.](#6.sentence-1)
