Localization

From wowdev
Jump to navigation Jump to search

A column marked as Loc is actually 17 columns with one column per language and a bitmask in the end.

There can be multiple languages filled in -- i.e. multi-language DBCs are possible.

Blizzard no longer uses multiple columns for Localization since Cataclysm. From there on, there just is one column with a string in the language given by the locale directory. This conserves space and prevents errors with missing locale data as present on a lot of modded servers, where a locale_i DBC is taken and edited, packed and distributed, therefore resulting in empty strings for all clients not using locale_i. In Cataclysm and up, there just will be wrong language strings.

Number of columns actually varies depending on client version. The information how to read a particular structure is given [here]

Column Field
0 enUS / enGB English US / English GB
1 koKR Korean
2 frFR French
3 deDE German
4 zhCN Chinese
5 zhTW Taiwan
6 esES Spanish (Spain)
7 esMX Spanish (Mexican)
8 ruRU Russian
9 jaJP Japanese
10 ptPT Portuguese. Also ptBR
11 itIT Italian
12 unused1 Unused
13 unused2 Unused
14 unused2 Unused
15 flags BitMask that always follows the string fields. Never read by the client.

Russian was added in TBC, Portugese and Italian were added in WotLK

struct langstringref
{
#if < Cata
  stringref enUS;   // also enGB
  stringref koKR;
  stringref frFR;
  stringref deDE;
  stringref enCN;   // also zhCN
  stringref enTW;   // also zhTW
  stringref esES;
  stringref esMX;
//! \todo verify that pre->8 locales hadn't changed
#if ≥ BC (2.1.0.6692)
  stringref ruRU;
  stringref jaJP; // unknowns are still unused as of 8.0.1.26095
  stringref ptPT;   // also ptBR
  stringref itIT;
  stringref unknown_12;
  stringref unknown_13;
  stringref unknown_14;
  stringref unknown_15;
#endif
  uint32_t flags;
#else
  stringref client_locale;
#endif
};