_get_current_locale_get_current_locale

获取表示当前区域设置的区域设置对象。Gets a locale object representing the current locale.

语法Syntax

_locale_t _get_current_locale(void);

返回值Return Value

表示当前区域设置的区域设置对象。A locale object representing the current locale.

备注Remarks

_Get_current_locale函数获取线程的当前设置的区域设置,并返回表示该区域设置的区域设置对象。The _get_current_locale function gets the currently set locale for the thread and returns a locale object representing that locale.

此函数的先前名称 __get_current_locale (具有两个前导下划线)已弃用。The previous name of this function, __get_current_locale (with two leading underscores) has been deprecated.

要求Requirements

例程所返回的值Routine 必需的标头Required header
_get_current_locale_get_current_locale <locale.h><locale.h>

有关更多兼容性信息,请参阅 兼容性For more compatibility information, see Compatibility.

请参阅See also

setlocale、_wsetlocalesetlocale, _wsetlocale
_create_locale、_wcreate_locale_create_locale, _wcreate_locale
_free_locale_free_locale