]> git.lyx.org Git - lyx.git/blobdiff - src/Language.cpp
InsetParamsDialog: fix Restore button enabling/disabling.
[lyx.git] / src / Language.cpp
index 6035aef3a388202e9c0946cd687d5fd163763454..1ff2cf71892a8e010177c0c33b757495c5be6559 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "support/debug.h"
 #include "support/FileName.h"
+#include "support/lstrings.h"
 
 using namespace std;
 using namespace lyx::support;
@@ -44,11 +45,13 @@ bool Language::read(Lexer & lex)
        lex >> display_;
        lex >> rightToLeft_;
        lex >> encodingStr_;
-       lex >> code_;
+       lex >> codeStr_;
        lex >> latex_options_;
        if (!lex)
                return false;
 
+       variety_ = split(codeStr_, code_, '-');
+
        encoding_ = encodings.fromLyXName(encodingStr_);
        if (!encoding_ && !encodingStr_.empty()) {
                encoding_ = encodings.fromLyXName("iso8859-1");
@@ -57,6 +60,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)
 {