X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Flanguage.C;h=c811aac9a9c5bfe41897eb6425d4f1ec54c4f079;hb=7f68b94d8a7fba6942890b7733403192b98b040a;hp=bb5d5f1d67d7e22ab49b0e4fe51609ce9d4d5524;hpb=8283e978f8d621041c432b9b88a476bfd567385c;p=lyx.git diff --git a/src/language.C b/src/language.C index bb5d5f1d67..c811aac9a9 100644 --- a/src/language.C +++ b/src/language.C @@ -1,27 +1,27 @@ -/* This file is part of - * ====================================================== +/** + * \file language.C + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. * - * LyX, The Document Processor + * \author Lars Gullik Bjønnes + * \author Jean-Marc Lasgouttes + * \author Dekel Tsur * - * Copyright 1995 Matthias Ettrich - * Copyright 1995-2001 The LyX Team. - * - * ====================================================== */ + * Full author contact details are available in file CREDITS. + */ #include -#ifdef __GNUG__ -#pragma implementation -#endif - #include "language.h" -#include "gettext.h" + +#include "debug.h" #include "encoding.h" -#include "lyxrc.h" #include "lyxlex.h" -#include "debug.h" +#include "lyxrc.h" using std::endl; +using std::string; + Languages languages; Language const * english_language; @@ -30,22 +30,14 @@ Language ignore_lang("ignore", "ignore", "Ignore", false, 0, "ignore", ""); Language const * ignore_language = &ignore_lang; Language latex_lang("latex", "latex", "Latex", false, 0, "latex", ""); Language const * latex_language = &latex_lang; -#ifdef INHERIT_LANG -Language inherit_lang("inherit", "inherit", "Inherit", false, 0, "inherit", ""); -Language const * inherit_language = &inherit_lang; -#endif - -void Languages::setDefaults() -{ - languagelist["english"] = Language("english", "english", N_("English"), - false, - encodings.getEncoding("iso8859-1"), - "en", ""); - english_language = default_language = &languagelist["english"]; -} void Languages::read(string const & filename) { + // We need to set the encoding of latex_lang + latex_lang = Language("latex", "latex", "Latex", false, + encodings.getEncoding("iso8859-1"), + "latex", ""); + LyXLex lex(0, 0); lex.setFile(filename); while (lex.isOK()) {