@@ -75,40 +75,40 @@ struct LanguagePackHeader {
}
/**
* Get the index for the given case.
* @param case_str The string representation of the case.
* @return The index of the case, or MAX_NUM_CASES when the case is unknown.
*/
uint8 GetCaseIndex(const char *case_str) const
{
for (uint8 i = 0; i < MAX_NUM_CASES; i++) {
if (strcmp(case_str, this->cases[i]) == 0) return i;
return MAX_NUM_CASES;
};
/** Make sure the size is right. */
assert_compile(sizeof(LanguagePackHeader) % 4 == 0);
/** Metadata about a single language. */
struct LanguageMetadata : public LanguagePackHeader {
char file[MAX_PATH]; ///< Name of the file we read this data from.
/** Type for the list of language meta data. */
typedef SmallVector<LanguageMetadata, 4> LanguageList;
typedef std::vector<LanguageMetadata> LanguageList;
/** The actual list of language meta data. */
extern LanguageList _languages;
/** The currently loaded language. */
extern const LanguageMetadata *_current_language;
#ifdef WITH_ICU_I18N
extern icu::Collator *_current_collator;
#endif /* WITH_ICU_I18N */
bool ReadLanguagePack(const LanguageMetadata *lang);
const LanguageMetadata *GetLanguage(byte newgrflangid);
#endif /* LANGUAGE_H */