2000-03-10 13:52:19 +00:00
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#include "language.h"
|
|
|
|
#include "gettext.h"
|
|
|
|
|
|
|
|
Languages languages;
|
2000-05-19 19:46:23 +00:00
|
|
|
Language const * default_language;
|
|
|
|
Language ignore_lang("ignore", "Ignore", false);
|
2000-03-17 10:14:46 +00:00
|
|
|
Language const * ignore_language = &ignore_lang;
|
2000-03-10 13:52:19 +00:00
|
|
|
|
2000-04-04 00:19:15 +00:00
|
|
|
///
|
2000-03-10 13:52:19 +00:00
|
|
|
class LangInit {
|
|
|
|
public:
|
2000-04-04 00:19:15 +00:00
|
|
|
///
|
2000-03-10 13:52:19 +00:00
|
|
|
LangInit() {
|
|
|
|
if (!init) initL();
|
|
|
|
init = true;
|
|
|
|
}
|
|
|
|
private:
|
2000-04-04 00:19:15 +00:00
|
|
|
///
|
2000-03-17 10:14:46 +00:00
|
|
|
void newLang(string const & l, string const & d, bool rtl) {
|
2000-03-10 13:52:19 +00:00
|
|
|
Language lang;
|
|
|
|
lang.lang = l;
|
|
|
|
lang.display = d;
|
2000-03-17 10:14:46 +00:00
|
|
|
lang.RightToLeft = rtl;
|
2000-03-10 13:52:19 +00:00
|
|
|
languages[l] = lang;
|
|
|
|
}
|
2000-04-04 00:19:15 +00:00
|
|
|
///
|
|
|
|
void initL();
|
|
|
|
///
|
2000-03-10 13:52:19 +00:00
|
|
|
static bool init;
|
|
|
|
};
|
2000-04-04 00:19:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
void LangInit::initL()
|
|
|
|
{
|
|
|
|
newLang("afrikaans", N_("Afrikaans"), false);
|
|
|
|
newLang("american", N_("American"), false);
|
|
|
|
newLang("arabic", N_("Arabic"), true);
|
|
|
|
newLang("austrian", N_("Austrian"), false);
|
|
|
|
newLang("bahasa", N_("Bahasa"), false);
|
|
|
|
newLang("brazil", N_("Brazil"), false);
|
|
|
|
newLang("breton", N_("Breton"), false);
|
|
|
|
newLang("catalan", N_("Catalan"), false);
|
|
|
|
newLang("croatian", N_("Croatian"), false);
|
|
|
|
newLang("czech", N_("Czech"), false);
|
|
|
|
newLang("danish", N_("Danish"), false);
|
|
|
|
newLang("dutch", N_("Dutch"), false);
|
|
|
|
newLang("english", N_("English"), false);
|
|
|
|
newLang("esperanto", N_("Esperanto"), false);
|
|
|
|
newLang("estonian", N_("Estonian"), false);
|
|
|
|
newLang("finnish", N_("Finnish"), false);
|
|
|
|
newLang("francais", N_("Francais"), false);
|
|
|
|
newLang("french", N_("French"), false);
|
|
|
|
newLang("frenchb", N_("Frenchb"), false);
|
|
|
|
newLang("galician", N_("Galician"), false);
|
|
|
|
newLang("german", N_("German"), false);
|
|
|
|
newLang("greek", N_("Greek"), false);
|
|
|
|
newLang("hebrew", N_("Hebrew"), true);
|
|
|
|
newLang("hungarian", N_("Hungarian"), false);
|
|
|
|
newLang("irish", N_("Irish"), false);
|
|
|
|
newLang("italian", N_("Italian"), false);
|
|
|
|
newLang("lsorbian", N_("Lsorbian"), false);
|
|
|
|
newLang("magyar", N_("Magyar"), false);
|
|
|
|
newLang("norsk", N_("Norsk"), false);
|
|
|
|
newLang("polish", N_("Polish"), false);
|
|
|
|
newLang("portuges", N_("Portuges"), false);
|
|
|
|
newLang("romanian", N_("Romanian"), false);
|
|
|
|
newLang("russian", N_("Russian"), false);
|
|
|
|
newLang("scottish", N_("Scottish"), false);
|
|
|
|
newLang("spanish", N_("Spanish"), false);
|
|
|
|
newLang("slovak", N_("Slovak"), false);
|
|
|
|
newLang("slovene", N_("Slovene"), false);
|
|
|
|
newLang("swedish", N_("Swedish"), false);
|
|
|
|
newLang("turkish", N_("Turkish"), false);
|
|
|
|
newLang("usorbian", N_("Usorbian"), false);
|
|
|
|
newLang("welsh", N_("Welsh"), false);
|
|
|
|
default_language = &languages["american"];
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2000-03-10 13:52:19 +00:00
|
|
|
static
|
|
|
|
LangInit langinit;
|
|
|
|
|
|
|
|
bool LangInit::init = false;
|