Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting Windows Language
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00617356
Message ID:
00617462
Vues:
28
>>If you have the MSDN Library, do a search for "Table of Language Identifiers".
>>
>>If you don't, look at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/nls_238z.asp
>>
>>The table shows the values in hex and shows, 0x0C0C for French-Candian, which is the hex representation of 3084.
>
>Usually I think about checking the web before posting, but I guess my brain must be in Friday-mode! :)
>
>With a little experimentation, I found that just checking the last 8 bits (values 1 through 128) would give me the "generic" language, but the page you've provided confirms my findings!
>
>So BITAND(..., 255) returns 12 for French, and 9 for English.
>
>Thanks again!

Sure thing, but actually it may be 9 bits. Here's the section on the language indentifier format from the Platform SDK:

Language Identifiers

A language identifier is a standard international numeric abbreviation for the language in a country or geographical region. Each language has a unique language identifier (LANGID), a 16-bit value that consists of a primary language identifier and a sublanguage identifier. The LANGID is constructed using the MAKELANGID macro. The following illustration shows the format of the bits in a LANGID.
+-------------------------+-------------------------+
|  SubLanguage ID  |   Primary Language ID   |
+-------------------------+-------------------------+
15                    10  9                         0   bit
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform