2.2.1 Locale Names without LCIDs

Every locale name without an assigned LCID MAY be temporarily given one of the LCIDs in the following table, if the application requests an LCID.<14> These locale names include any valid [RFC5646] language tag.

Note: LCID assignments for Locale Names without LCIDs are temporary and are not suitable for use across a protocol, or for interchange between processes or machines. These temporary LCID assignments are also unsuitable for tagging persisted data as the meaning of the LCID assignment will change over time.

Name

Value

Conditions

LOCALE_CUSTOM_USER_DEFAULT<15>

0x0C00

When an LCID without a permanent LCID assignment is also the current user locale, the protocol will respond with LOCALE_CUSTOM_USER_DEFAULT for that locale. This assignment persists until the user changes the locale. Because the meaning changes over time, applications are discouraged from persisting this data. Though this value will likely refer to the same locale for the lifetime of the current process, that is not guaranteed. This assignment is a 1-to-1 relationship between this LCID and the user’s current default locale name.

Transient LCIDs<16>

0x3000, 0x3400, 0x3800, 0x3C00, 0x4000, 0x4400, 0x4800, 0x4C00

Some user configurations temporarily associate a locale without a permanent LCID assignment with one of these 8 transient LCIDs. This assignment is transient and it is not guaranteed; it will likely refer to the same locale for the lifetime of the process. However, this assignment will differ for other users on the machine, or other machines, and, as such, is unsuitable for use in protocols or persisted data. This assignment is a temporary 1-to-1 relationship between an LCID and a particular locale name and will round trip until that relationship changes.

LOCALE_CUSTOM_UNSPECIFIED<17>

0x1000

When an LCID is requested for a locale without a permanent LCID assignment, nor a temporary assignment as above, the protocol will respond with LOCALE_CUSTOM_UNSPECIFIED for all such locales. Because this single value is used for numerous possible locale names, it is impossible to round trip this locale, even temporarily. Applications should discard this value as soon as possible and never persist it. If the system is forced to respond to a request for LCID_CUSTOM_UNSPECIFIED, it will fall back to the current user locale. This is often incorrect but may prevent an application or component from failing. As the meaning of this temporary LCID is unstable, it should never be used for interchange or persisted data. This is a 1-to-many relationship that is very unstable.