* LyX, The Document Processor
*
* Copyright 1995 Matthias Ettrich
- * Copyright 1995-2000 The LyX Team.
+ * Copyright 1995-2001 The LyX Team.
*
* ====================================================== */
Languages languages;
Language const * english_language;
Language const * default_language;
-Language ignore_lang("ignore", "ignore", "Ignore", false, 0, "ignore");
+Language ignore_lang("ignore", "ignore", "Ignore", false, 0, "ignore", "");
Language const * ignore_language = &ignore_lang;
+Language inherit_lang("inherit", "inherit", "Inherit", false, 0, "inherit", "");
+Language const * inherit_language = &inherit_lang;
void Languages::setDefaults()
{
languagelist["english"] = Language("english", "english", N_("English"),
false,
encodings.getEncoding("iso8859-1"),
- "en");
+ "en", "");
english_language = default_language = &languagelist["english"];
}
{
LyXLex lex(0, 0);
lex.setFile(filename);
- while (lex.IsOK()) {
- string lang, babel, display, encoding_str, code;
+ while (lex.isOK()) {
+ string lang;
+ string babel;
+ string display;
+ string encoding_str;
+ string code;
+ string latex_options;
bool rtl = false;
if (lex.next())
- lang = lex.GetString();
+ lang = lex.getString();
else
break;
lyxerr[Debug::INIT] << "Reading language " << lang << endl;
if (lex.next())
- babel = lex.GetString();
+ babel = lex.getString();
if (lex.next())
- display = lex.GetString();
+ display = lex.getString();
if (lex.next())
- rtl = lex.GetBool();
+ rtl = lex.getBool();
if (lex.next())
- encoding_str = lex.GetString();
+ encoding_str = lex.getString();
if (lex.next())
- code = lex.GetString();
+ code = lex.getString();
+ if (lex.next())
+ latex_options = lex.getString();
Encoding const * encoding = encodings.getEncoding(encoding_str);
if (!encoding) {
lyxerr << "Unknown encoding " << encoding_str << endl;
}
- languagelist[lang] = Language(lang, babel, display, rtl, encoding, code);
+ languagelist[lang] = Language(lang, babel, display, rtl,
+ encoding, code, latex_options);
}
-#ifdef DO_USE_DEFAULT_LANGUAGE
- languagelist["default"] = Language("default", "default",
- N_("Document wide language"),
- false, &iso8859_1, "");
-#endif
default_language = getLanguage(lyxrc.default_language);
if (!default_language) {
lyxerr << "Default language \"" << lyxrc.default_language
{
const_iterator it = languagelist.find(language);
if (it != languagelist.end())
- return &(*it).second;
+ return &it->second;
else
return 0;
}