2013-11-29 14:36:47 +00:00
|
|
|
#ifndef TRANSLATE_H
|
2004-08-23 00:15:46 +00:00
|
|
|
#define TRANSLATE_H
|
2013-11-29 14:36:47 +00:00
|
|
|
typedef const char* translation_t;
|
2004-08-23 00:15:46 +00:00
|
|
|
|
|
|
|
#define MAX_LANGUAGES 64
|
|
|
|
|
|
|
|
void TranslateInit(void);
|
|
|
|
|
|
|
|
void SV_InitLanguages(void);
|
|
|
|
|
2013-11-29 14:36:47 +00:00
|
|
|
struct language_s
|
|
|
|
{
|
|
|
|
char *name;
|
|
|
|
struct po_s *po;
|
2023-01-09 05:11:34 +00:00
|
|
|
struct po_s *po_qex;
|
2014-02-07 08:38:40 +00:00
|
|
|
};
|
|
|
|
extern struct language_s languages[MAX_LANGUAGES];
|
2018-12-28 00:04:36 +00:00
|
|
|
extern int com_language;
|
|
|
|
extern cvar_t language;
|
2013-11-29 14:36:47 +00:00
|
|
|
#define langtext(t,l) PO_GetText(languages[l].po, t)
|
2020-08-13 08:39:48 +00:00
|
|
|
#define localtext(t) PO_GetText(languages[com_language].po, t)
|
2013-11-29 14:36:47 +00:00
|
|
|
int TL_FindLanguage(const char *lang);
|
2004-08-23 00:15:46 +00:00
|
|
|
|
|
|
|
#endif
|