]> git.lyx.org Git - lyx.git/blobdiff - src/Language.cpp
Reorder a bit status messages, but they are still cleared at the end of LyXFunc
[lyx.git] / src / Language.cpp
index ae9de0d63f4d2fbf644516250aae0a5cba0ab9b2..2093bc373cd028b963ce77b86fa68c6234695906 100644 (file)
@@ -3,7 +3,7 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author Lars Gullik Bjønnes
+ * \author Lars Gullik Bjønnes
  * \author Jean-Marc Lasgouttes
  * \author Dekel Tsur
  *
@@ -33,6 +33,7 @@ Language latex_lang;
 Language const * default_language;
 Language const * ignore_language = &ignore_lang;
 Language const * latex_language = &latex_lang;
+Language const * reset_language = 0;
 
 
 bool Language::read(Lexer & lex)
@@ -56,6 +57,16 @@ bool Language::read(Lexer & lex)
        return true;
 }
 
+bool Language::internalFontEncoding() const
+{
+       // FIXME: list incomplete
+       // FIXME: instead of hardcoding, this
+       // should go to the languages file
+       return lang_ == "hebrew"
+               || lang_ == "greek"
+               || lang_ == "polutonikogreek";
+}
+
 
 void Languages::read(FileName const & filename)
 {
@@ -90,8 +101,12 @@ void Languages::read(FileName const & filename)
 
 Language const * Languages::getLanguage(string const & language) const
 {
+       if (language == "reset")
+               return reset_language;
+       if (language == "ignore")
+               return ignore_language;
        const_iterator it = languagelist.find(language);
-       return it == languagelist.end() ? 0 : &it->second;
+       return it == languagelist.end() ? reset_language : &it->second;
 }