Namespace
Varianti

LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, LC_TIME

Da cppreference.com.
< cpp‎ | locale

 
 
Localizzazioni libreria
Impostazioni internazionali e sfaccettature
Original:
Locales and facets
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
locale
Carattere classificazione
Original:
Character classification
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Conversioni
Original:
Conversions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Facet categoria classi di base
Original:
Facet category base classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Facet categorie
Original:
Facet categories
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Locale specifici aspetti
Original:
Locale-specific facets
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Codice di conversione sfaccettature
Original:
Code conversion facets
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
codecvt_utf8(C++11)
codecvt_utf16(C++11)
C locale
Original:
C locale
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
LC_ALL
LC_COLLATE
LC_CTYPE
LC_MONETARY
LC_NUMERIC
LC_TIME
 
Defined in header <clocale>
#define LC_ALL      /*implementation defined*/
#define LC_COLLATE  /*implementation defined*/
#define LC_CTYPE    /*implementation defined*/
#define LC_MONETARY /*implementation defined*/
#define LC_NUMERIC  /*implementation defined*/
#define LC_TIME     /*implementation defined*/
Ciascuna delle costanti macro di cui sopra si espandono per interi espressioni costanti con valori distinti che sono adatti per l'uso come primo argomento di std::setlocale.
Original:
Each of the above macro constants expand to integer constant expressions with distinct values that are suitable for use as the first argument of std::setlocale.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Constant
Original:
Constant
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Explanation
LC_ALL
seleziona l'intero locale C
Original:
selects the entire C locale
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
LC_COLLATE
seleziona la categoria di regole di confronto della versione locale
Original:
selects the collation category of the C locale
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
LC_CTYPE
seleziona la categoria di classificazione carattere della versione locale
Original:
selects the character classification category of the C locale
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
LC_MONETARY
seleziona la categoria monetaria formattazione della versione locale
Original:
selects the monetary formatting category of the C locale
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
LC_NUMERIC
seleziona la categoria di formattazione numerica della versione locale
Original:
selects the numeric formatting category of the C locale
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
LC_TIME
seleziona la categoria formattazione tempo della versione locale
Original:
selects the time formatting category of the C locale
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Costanti macro aggiuntive, con nomi che iniziano con LC_ seguita da almeno una lettera maiuscola, può essere definita in <clocale>. Ad esempio, la specifica POSIX richiede LC_MESSAGES e la libreria C GNU definisce inoltre LC_PAPER, lc_name, LC_ADDRESS, LC_TELEPHONE, LC_MEASUREMENT e LC_IDENTIFICATION.
Original:
Additional macro constants, with names that begin with LC_ followed by at least one uppercase letter, may be defined in <clocale>. For example, the POSIX specification requires LC_MESSAGES and the GNU C library additionally defines LC_PAPER, LC_NAME, LC_ADDRESS, LC_TELEPHONE, LC_MEASUREMENT, and LC_IDENTIFICATION.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifica] Esempio

#include <cstdio>
#include <clocale>
#include <ctime>
#include <cwchar>
int main()
{
    std::setlocale(LC_ALL, "en_US.UTF-8"); // the C locale will be the UTF-8 enabled English
    std::setlocale(LC_NUMERIC, "de_DE");   // decimal dot will be German
    std::setlocale(LC_TIME, "ja_JP");      // date/time formatting will be Japanese
    wchar_t str[100];
    std::time_t t = std::time(NULL);
    std::wcsftime(str, 100, L"%A %c", std::localtime(&t));
    std::wprintf(L"Number: %.2f\nDate: %Ls\n", 3.14, str);
}

Output:

Number: 3,14
Date: 月曜日 2011年12月19日 18時04分40秒

[modifica] Vedi anche

ottiene e imposta la localizzazione corrente C
Original:
gets and sets the current C locale
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(funzione) [edit]
serie di aspetti polimorfi che incapsulano le differenze culturali
Original:
set of polymorphic facets that encapsulate cultural differences
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe) [edit]