X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLanguage.cpp;h=1ff2cf71892a8e010177c0c33b757495c5be6559;hb=5142d1c86ada8df7451534402e2a1716678ee8b7;hp=e4bb4314d8440cbf33488dbfa011bc5fdbee2028;hpb=9d23d76c8eb31562706bbe16c2f54f935bf290db;p=lyx.git diff --git a/src/Language.cpp b/src/Language.cpp index e4bb4314d8..1ff2cf7189 100644 --- a/src/Language.cpp +++ b/src/Language.cpp @@ -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 * @@ -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) {