StormLib API Reference

SFileSetLocale

Description

LCID WINAPI SFileSetLocale(
  LCID lcNewLocale                  // Locale ID for file operations
);

Function SFileSetLocale sets a preferred locale for file functions, such as SFileOpenFileEx or SFileAddFileEx. The locale is stored as a global variable and thus affects every open or add operation.

Note that this function does not change locale ID of any existing file in the MPQ.

Parameters

lcNewLocale
[in] Locale ID to be set.

Return Value

The function never fails and always returns lcNewLocale.

Remarks

The locale ID corresponds to the country ID. Country IDs are defined in Windows headers. The following table shows an example of existing locales:

Value Language version Value Language version
0Neutral/English (American) 0x404Chinese (Taiwan)
0x405Czech 0x407German
0x409English 0x40aSpanish
0x40cFrench 0x410Italian
0x411Japanese 0x412Korean
0x415Polish 0x416Portuguese
0x419Russsian 0x809English (UK)

Different StormLib functions treat the preferred locale differently:

Availability in Storm.dll

Available in Storm.dll Yes
Ordinal number in Storm.dll 1.00 83 (0x053)
Ordinal number in Storm.dll 1.09 272 (0x110)