]> git.lyx.org Git - lyx.git/blobdiff - src/language.C
hopefully fix tex2lyx linking.
[lyx.git] / src / language.C
index c656f22992fd1a78a883ba0fe5c5387a57264e32..e056463e93ca9fb528edef31c26ccc0f6de271c3 100644 (file)
@@ -19,6 +19,9 @@
 #include "lyxlex.h"
 #include "lyxrc.h"
 
+
+namespace lyx {
+
 using std::endl;
 using std::string;
 
@@ -36,7 +39,7 @@ void Languages::read(string const & filename)
 {
        // We need to set the encoding of latex_lang
        latex_lang = Language("latex", "latex", "Latex", false, "iso8859-1",
-                             encodings.getEncoding("iso8859-1"),
+                             encodings.getFromLyXName("iso8859-1"),
                              "latex", "");
 
        LyXLex lex(0, 0);
@@ -69,9 +72,9 @@ void Languages::read(string const & filename)
                if (lex.next())
                        latex_options = lex.getString();
 
-               Encoding const * encoding = encodings.getEncoding(encoding_str);
+               Encoding const * encoding = encodings.getFromLyXName(encoding_str);
                if (!encoding) {
-                       encoding = encodings.getEncoding("iso8859-1");
+                       encoding = encodings.getFromLyXName("iso8859-1");
                        lyxerr << "Unknown encoding " << encoding_str << endl;
                }
 
@@ -100,3 +103,6 @@ Language const * Languages::getLanguage(string const & language) const
        const_iterator it = languagelist.find(language);
        return it == languagelist.end() ? 0 : &it->second;
 }
+
+
+} // namespace lyx