| OpenTTD
    | 
Header of a language file. More...
#include <language.h>
 
  
 | Public Member Functions | |
| bool | IsValid () const | 
| Check whether the header is a valid header for OpenTTD. | |
| uint8 | GetGenderIndex (const char *gender_str) const | 
| Get the index for the given gender. | |
| uint8 | GetCaseIndex (const char *case_str) const | 
| Get the index for the given case. | |
| Data Fields | |
| uint32 | ident | 
| 32-bits identifier | |
| uint32 | version | 
| 32-bits of auto generated version info which is basically a hash of strings.h | |
| char | name [32] | 
| the international name of this language | |
| char | own_name [32] | 
| the localized name of this language | |
| char | isocode [16] | 
| the ISO code for the language (not country code) | |
| uint16 | offsets [TAB_COUNT] | 
| the offsets | |
| char | digit_group_separator [8] | 
| Thousand separator used for anything not currencies. | |
| char | digit_group_separator_currency [8] | 
| Thousand separator used for currencies. | |
| char | digit_decimal_separator [8] | 
| Decimal separator. | |
| uint16 | missing | 
| number of missing strings. | |
| byte | plural_form | 
| plural form index | |
| byte | text_dir | 
| default direction of the text | |
| uint16 | winlangid | 
| Windows language ID: Windows cannot and will not convert isocodes to something it can use to determine whether a font can be used for the language or not. | |
| uint8 | newgrflangid | 
| newgrf language id | |
| uint8 | num_genders | 
| the number of genders of this language | |
| uint8 | num_cases | 
| the number of cases of this language | |
| byte | pad [3] | 
| pad header to be a multiple of 4 | |
| char | genders [MAX_NUM_GENDERS][CASE_GENDER_LEN] | 
| the genders used by this translation | |
| char | cases [MAX_NUM_CASES][CASE_GENDER_LEN] | 
| the cases used by this translation | |
| Static Public Attributes | |
| static const uint32 | IDENT = 0x474E414C | 
| Identifier for OpenTTD language files, big endian for "LANG". | |
Header of a language file.
Definition at line 32 of file language.h.
| 
 | inline | 
Get the index for the given case.
| case_str | The string representation of the case. | 
Definition at line 88 of file language.h.
References cases, and MAX_NUM_CASES.
Referenced by GlobalVarChangeInfo().
| 
 | inline | 
Get the index for the given gender.
| gender_str | The string representation of the gender. | 
Definition at line 75 of file language.h.
References genders, and MAX_NUM_GENDERS.
Referenced by GlobalVarChangeInfo().
| bool LanguagePackHeader::IsValid | ( | ) | const | 
Check whether the header is a valid header for OpenTTD.
Definition at line 1700 of file strings.cpp.
References digit_decimal_separator, digit_group_separator, digit_group_separator_currency, IDENT, ident, isocode, lastof, MAX_LANG, MAX_NUM_CASES, MAX_NUM_GENDERS, name, newgrflangid, num_cases, num_genders, own_name, plural_form, StrValid(), text_dir, and version.
Referenced by GetLanguageFileHeader(), and ReadLanguagePack().
| uint16 LanguagePackHeader::winlangid | 
Windows language ID: Windows cannot and will not convert isocodes to something it can use to determine whether a font can be used for the language or not.
As a result of that we need to pass the language id via strgen to OpenTTD to tell what language it is in "Windows". The ID is the 'locale identifier' on: http://msdn.microsoft.com/en-us/library/ms776294.aspxwindows language id
Definition at line 59 of file language.h.
Referenced by CheckForMissingGlyphs(), GetLanguageFileHeader(), FileStringReader::HandlePragma(), and LanguageWriter::WriteLang().
 1.8.1.2
 1.8.1.2