Files
2025-10-25 03:02:53 +03:00

70 lines
2.0 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[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.5C 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)