PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
|
Provides multi-lingual localization API functions. More...
Go to the source code of this file.
Classes | |
struct | lconv |
lconv contains members related to the formatting of numeric values. More... | |
Macros | |
#define | LC_ALL 0x001F |
Selects category names for the entire locale. | |
#define | LC_COLLATE 0x0001 |
Affects the behavior of strcoll and strxfrm functions. | |
#define | LC_CTYPE 0x0002 |
Affects the behavior of the character handling and multibyte functions. | |
#define | LC_MONETARY 0x0004 |
Affects the monetary format information returned by localeconv. | |
#define | LC_NUMERIC 0x0008 |
Affects the decimal point character and other information for formatted I/O. | |
#define | LC_TIME 0x0010 |
Affects the behavior of the strftime and strfxtime functions. | |
Functions | |
char * | setlocale (int category, const char *locale) |
struct lconv * | localeconv (void) |
Provides multi-lingual localization API functions.
C localization functions are used in multilingual programs to adapt to the specific locale for displaying numbers and currency. Functions affect the C Standard Library I/O function behavior.
The only locales supported is "C" and a C.UTF-8 locale which is the same as C but supports UTF-8 multibyte character encoding. Things like currency and so forth are hard coded to the C locale.
Definition in file locale.h.
struct lconv |
lconv contains members related to the formatting of numeric values.
Class Members | ||
---|---|---|
char * | currency_symbol | The currency symbol applicable in the current locale. |
char * | decimal_point | The decimal-point character used to format non-monetary quantities. |
char | frac_digits | The number of fractional digits to be displayed in a locally formatted monetary quantity. |
char * | grouping | A string that indicates the size of each group of digits in non-monetary quantities. |
char * | int_curr_symbol |
The international currency symbol applicable to the current locale. The first three characters contain the alphabetic international currency symbol in accordance with those specified in ISO 4217:1995. The fourth character (immediately preceding the null character) is the character used to separate the international currency symbol from the monetary quantity. |
char | int_frac_digits | The number of fractional digits to be displayed in a monetary quantity. |
char | int_n_cs_precedes | Set to 1 or 0 if the int_currency_symbol precedes or succeeds respectively the value for a negative internationally formatted monetary quantity. |
char | int_n_sep_by_space | Set to a value indicating the separation of the int_currency_symbol the sign string, and the value for negative international monetary formatted quantities. |
char | int_n_sign_posn | Set to a value indicating the position of the positive_sign for negative international monetary formatted quantity. |
char | int_p_cs_precedes | Set to 1 or 0 if the int_currency_symbol precedes or succeeds respectively the value for a non-negative internationally formatted monetary quantity. |
char | int_p_sep_by_space | Set to a value indicating the separation of the int_currency_symbol the sign string, and the value for non-negative international monetary formatted quantities. |
char | int_p_sign_posn | Set to a value indicating the position of the positive_sign for non-negative international monetary formatted quantity. |
char * | mon_decimal_point | The decimal-point used to format monetary quantities. |
char * | mon_grouping | A string that indicates the size of each group of digits in monetary quantities. |
char * | mon_thousands_sep | The separator for groups of digits before the decimal-point in monetary quantities. |
char | n_cs_precedes | Set to 1 or 0 if currency_symbol preceeds or succeeds respectively the negative value of monetary quantity. |
char | n_sep_by_space | Set to a value indicating the separation of the currency_symbol, the sign, and the value for negative monetary quantity. |
char | n_sign_posn | Set to a value indicating the position of the positive_sign for negative monetary quantity. |
char * | negative_sign | A string that indicates a negative formatted value in monetary quantities. |
char | p_cs_precedes | Set to 1 or 0 if currency_symbol preceeds or succeeds respectively the non-negative value of monetary quantity. |
char | p_sep_by_space | Set to a value indicating the separation of the currency_symbol, the sign, and the value for non-negative monetary quantity. |
char | p_sign_posn | Set to a value indicating the position of the positive_sign for non-negative monetary quantity. |
char * | positive_sign | A string that indicates a non-negative formatted value in monetary quantities. |
char * | thousands_sep | The character used to separate groups of digits in non-monetary quantities. |
struct lconv* localeconv | ( | void | ) |
Select the part of the program's locale as specified by the category and locale parameters. The function can be used to change or query the program's current locale.
The default is supposed to be setlocale(LC_ALL, "C");
category | A macro to select the Locale portion to select. |
locale | A string specifying the locale environment. Normally "C" for our use. If locale is NULL, setlocale will return the category of the current locale. |