Skip to content

Commit 97d003c

Browse files
committed
Merging changes synced from https://github.com/MicrosoftDocs/cpp-docs-pr (branch live)
2 parents 87c6783 + 8688382 commit 97d003c

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

docs/c-runtime-library/reference/configthreadlocale.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: "_configthreadlocale"
3-
ms.date: "4/2/2020"
3+
ms.date: "10/29/2020"
4+
description: "Describes the Microsoft C runtime function `_configthreadlocale` used to configure per-thread locale options."
45
api_name: ["_configthreadlocale", "_o__configthreadlocale"]
56
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-locale-l1-1-0.dll", "api-ms-win-crt-private-l1-1-0.dll"]
67
api_type: ["DLLExport"]
@@ -9,7 +10,7 @@ f1_keywords: ["_configthreadlocale", "configthreadlocale"]
910
helpviewer_keywords: ["configthreadlocale function", "locales, per-thread", "_configthreadlocale function", "per-thread locale", "thread locale"]
1011
ms.assetid: 10e4050e-b587-4f30-80bc-6c76b35fc770
1112
---
12-
# _configthreadlocale
13+
# `_configthreadlocale`
1314

1415
Configures per-thread locale options.
1516

@@ -21,36 +22,36 @@ int _configthreadlocale( int per_thread_locale_type );
2122
2223
### Parameters
2324
24-
*per_thread_locale_type*<br/>
25+
*`per_thread_locale_type`*\
2526
The option to set. One of the options listed in the following table.
2627
2728
## Return Value
2829
29-
The previous per-thread locale status (**_DISABLE_PER_THREAD_LOCALE** or **_ENABLE_PER_THREAD_LOCALE**), or -1 on failure.
30+
The previous per-thread locale status (**`_DISABLE_PER_THREAD_LOCALE`** or **`_ENABLE_PER_THREAD_LOCALE`**), or -1 on failure.
3031
3132
## Remarks
3233
33-
The **_configurethreadlocale** function is used to control the use of thread-specific locales. Use one of these *per_thread_locale_type* options to specify or determine the per-thread locale status:
34+
The **`_configthreadlocale`** function is used to control the use of thread-specific locales. Use one of these *`per_thread_locale_type`* options to specify or determine the per-thread locale status:
3435
3536
| Option | Description |
3637
|-|-|
37-
| **_ENABLE_PER_THREAD_LOCALE** | Make the current thread use a thread-specific locale. Subsequent calls to **setlocale** in this thread affect only the thread's own locale. |
38-
| **_DISABLE_PER_THREAD_LOCALE** | Make the current thread use the global locale. Subsequent calls to **setlocale** in this thread affect other threads using the global locale. |
38+
| **`_ENABLE_PER_THREAD_LOCALE`** | Make the current thread use a thread-specific locale. Subsequent calls to **`setlocale`** in this thread affect only the thread's own locale. |
39+
| **`_DISABLE_PER_THREAD_LOCALE`** | Make the current thread use the global locale. Subsequent calls to **`setlocale`** in this thread affect other threads using the global locale. |
3940
| **0** | Retrieves the current setting for this particular thread. |
4041
41-
These functions affect the behavior of **setlocale**, **_tsetlocale**, **_wsetlocale**, and **_setmbcp**. When per-thread locale is disabled, any subsequent call to **setlocale** or **_wsetlocale** changes the locale of all threads that use the global locale. When per-thread locale is enabled, **setlocale** or **_wsetlocale** only affects the current thread's locale.
42+
These functions affect the behavior of **`setlocale`**, **`_tsetlocale`**, **`_wsetlocale`**, and **`_setmbcp`**. When per-thread locale is disabled, any subsequent call to **`setlocale`** or **`_wsetlocale`** changes the locale of all threads that use the global locale. When per-thread locale is enabled, **`setlocale`** or **`_wsetlocale`** only affects the current thread's locale.
4243
43-
If you use **_configurethreadlocale** to enable a per-thread locale, we recommend that you call **setlocale** or **_wsetlocale** to set the preferred locale in that thread immediately afterward.
44+
If you use **`_configthreadlocale`** to enable a per-thread locale, we recommend that you call **`setlocale`** or **`_wsetlocale`** to set the preferred locale in that thread immediately afterward.
4445
45-
If *per_thread_locale_type* is not one of the values listed in the table, this function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function sets **errno** to **EINVAL** and returns -1.
46+
If *`per_thread_locale_type`* isn't one of the values listed in the table, this function invokes the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, this function sets **`errno`** to **`EINVAL`** and returns -1.
4647
4748
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](../global-state.md).
4849
4950
## Requirements
5051
5152
|Routine|Required header|
5253
|-------------|---------------------|
53-
|**_configthreadlocale**|\<locale.h>|
54+
|**`_configthreadlocale`**|\`<locale.h>`|
5455
5556
## Example
5657
@@ -163,7 +164,7 @@ The time in German locale is: 'Mittwoch, 12. Mai 2004'
163164

164165
## See also
165166

166-
[setlocale, _wsetlocale](setlocale-wsetlocale.md)<br/>
167-
[_beginthread, _beginthreadex](beginthread-beginthreadex.md)<br/>
168-
[Locale](../../c-runtime-library/locale.md)<br/>
169-
[Multithreading and Locales](../../parallel/multithreading-and-locales.md)<br/>
167+
[`setlocale`, `_wsetlocale`](setlocale-wsetlocale.md)\
168+
[`_beginthread`, `_beginthreadex`](beginthread-beginthreadex.md)\
169+
[Locale](../../c-runtime-library/locale.md)\
170+
[Multithreading and locales](../../parallel/multithreading-and-locales.md)

0 commit comments

Comments
 (0)