wowlib 0.0.0
Read & write World of Warcraft client files — a C++26 core
Loading...
Searching...
No Matches
locstring.hpp File Reference

LocString — the decoded form of a pre-Cataclysm localized string column (wowdev.wiki "langstringref"): one string per client language slot plus the locale flags field. More...

#include <array>
#include <cstddef>
#include <cstdint>
#include <optional>
#include <string>
#include <string_view>
#include <welder/vocabulary.hpp>
#include <wowlib/core/client_version.hpp>
#include <wowlib/core/error.hpp>
Include dependency graph for locstring.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  wowlib::db::LocString< Langs >
 A decoded pre-Cataclysm localized string column: Langs language slots (8 before TBC 2.1.0.6692 added ruRU, 16 after) plus the trailing locale flags field. More...

Namespaces

namespace  wowlib
namespace  wowlib::db

Typedefs

using wowlib::db::LocString8 = LocString<8>
 The vanilla-era column shape: 8 language slots (pre-2.1.0.6692).
using wowlib::db::LocString16 = LocString<16>
 The TBC..WotLK column shape: 16 language slots (2.1.0.6692+).

Functions

constexpr std::optional< std::size_t > wowlib::db::localeColumnSlot (Locale locale)
 The langstringref column slot locale occupies, in the client's fixed column order (0 enUS/enGB, 1 koKR, 2 frFR, 3 deDE, 4 zhCN, 5 zhTW, 6 esES, 7 esMX, 8 ruRU, 10 ptBR, 11 itIT — slots 9 and 12..15 belong to locales wowlib does not model).

Detailed Description

LocString — the decoded form of a pre-Cataclysm localized string column (wowdev.wiki "langstringref"): one string per client language slot plus the locale flags field.

Cataclysm+ clients store a single already-localized string instead, so their generated records use plain std::string members.

Definition in file locstring.hpp.