Information about languages and their files. More...
#include "core/smallvec_type.hpp"
#include <unicode/coll.h>
Go to the source code of this file.
Data Structures | |
struct | LanguagePackHeader |
Header of a language file. More... | |
struct | LanguageMetadata |
Metadata about a single language. More... | |
Typedefs | |
typedef SmallVector < LanguageMetadata, 4 > | LanguageList |
Type for the list of language meta data. | |
Functions | |
assert_compile (sizeof(LanguagePackHeader)%4==0) | |
Make sure the size is right. | |
bool | ReadLanguagePack (const LanguageMetadata *lang) |
Read a particular language. | |
const LanguageMetadata * | GetLanguage (byte newgrflangid) |
Get the language with the given NewGRF language ID. | |
Variables | |
static const uint8 | CASE_GENDER_LEN = 16 |
The (maximum) length of a case/gender string. | |
static const uint8 | MAX_NUM_GENDERS = 8 |
Maximum number of supported genders. | |
static const uint8 | MAX_NUM_CASES = 16 |
Maximum number of supported cases. | |
LanguageList | _languages |
The actual list of language meta data. | |
const LanguageMetadata * | _current_language |
The currently loaded language. | |
Collator * | _current_collator |
Collator for the language currently in use. |
Information about languages and their files.
Definition in file language.h.
typedef SmallVector<LanguageMetadata, 4> LanguageList |
Type for the list of language meta data.
Definition at line 98 of file language.h.
assert_compile | ( | sizeof(LanguagePackHeader)% | 4 = =0 |
) |
Make sure the size is right.
const LanguageMetadata* GetLanguage | ( | byte | newgrflangid | ) |
Get the language with the given NewGRF language ID.
newgrflangid | NewGRF languages ID to check. |
Definition at line 1672 of file strings.cpp.
References SmallVector< T, S >::Begin(), and SmallVector< T, S >::End().
Referenced by GetLanguageList(), and GlobalVarChangeInfo().
bool ReadLanguagePack | ( | const LanguageMetadata * | lang | ) |
Read a particular language.
lang | The metadata about the language. |
Definition at line 1522 of file strings.cpp.
References _config_language_file, _current_collator, _current_text_dir, _langtab_num, _langtab_start, BuildIndustriesLegend(), LanguageMetadata::file, free(), InitializeSortedCargoSpecs(), InvalidateWindowClassesData(), LanguagePackHeader::isocode, LanguagePackHeader::IsValid(), lastof, LanguagePackHeader::newgrflangid, LanguagePackHeader::offsets, ReadFileToMem(), SetCurrentGrfLangID(), SortIndustryTypes(), strecpy(), and LanguagePackHeader::text_dir.
Referenced by InitializeLanguagePacks(), and GameOptionsWindow::OnDropdownSelect().
The currently loaded language.
Definition at line 48 of file strings.cpp.
Referenced by GameOptionsWindow::BuildDropDownList(), SelectGameWindow::DrawWidget(), UnmappedChoiceList::Flush(), CrashLog::LogConfiguration(), SelectGameWindow::OnInit(), GameOptionsWindow::SetStringParameters(), and SelectGameWindow::UpdateWidgetSize().
The actual list of language meta data.
Definition at line 47 of file strings.cpp.
Referenced by GameOptionsWindow::BuildDropDownList(), and GameOptionsWindow::OnDropdownSelect().