How to set / retrieve locale using time date function in C++?
Macro | Descrption |
LC_ALL | Refers all localization categories. |
LC_COLLATE | Affects the operation of strcoll() function. |
LC_CTYPE | Alters the way the character functions work. |
LC_MONETARY | Determines the monetary format. |
LC_NUMERIC | Changes the decimal point character for formatted I/O functions. |
LC_TIME | Determine the functioning of strftime() function. |
#include <stdio.h> #include <locale.h> int main () { struct lconv * st; st=localeconv(); printf ("Locale is: %s\n", setlocale(LC_ALL,NULL) ); printf ("Currency symbol is: %s\n-\n",st->currency_symbol, setlocale (LC_ALL,"French") ); return 0; } |