locale.ch
Declarations
Public Only
Publicstruct lconv
struct lconv
The struct lconv contains numeric and monetary formatting rules as defined by a C locale. Objects of this struct may be obtained with localeconv. The members of lconv are values of type char and of type char*. Each char* member except decimal_point may be pointing at a null character (that is, at an empty C-string). The members of type char are all non-negative numbers, any of which may be CHAR_MAX if the corresponding value is not available in the current C locale.
Publicfunction setlocale
func setlocale(category : int, locale : *char) : *char
The setlocale function installs the specified system locale or its portion as the new C locale. The modifications remain in effect and influences the execution of all locale-sensitive C library functions until the next call to setlocale. If locale is a null pointer, setlocale queries the current C locale without modifying it.
A copy of the returned string along with the category used in this call to setlocale may be used later in the program to restore the locale back to the state at the end of this call.
Parameters
- category - locale category identifier, one of the LC_xxx macros. May be null. @param locale - system-specific locale identifier. Can be "" for the user-preferred locale or "C" for the minimal locale @return pointer to a narrow null-terminated string identifying the C locale after applying the changes, if any, or null pointer on failure. A copy of the returned string along with the category used in this call to setlocale may be used later in the program to restore the locale back to the state at the end of this call.
- locale - system-specific locale identifier. Can be "" for the user-preferred locale or "C" for the minimal locale @return pointer to a narrow null-terminated string identifying the C locale after applying the changes, if any, or null pointer on failure. A copy of the returned string along with the category used in this call to setlocale may be used later in the program to restore the locale back to the state at the end of this call.
Returns
pointer to a narrow null-terminated string identifying the C locale after applying the changes, if any, or null pointer on failure. A copy of the returned string along with the category used in this call to setlocale may be used later in the program to restore the locale back to the state at the end of this call.
Publicfunction localeconv
func localeconv() : *lconv
The localeconv function obtains a pointer to a static object of type lconv, which represents numeric and monetary formatting rules of the current C locale.
Returns
pointer to the current lconv object.