Introduce PolyglossiaName and PolyglossiaOpts.

Not yet functional.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36312 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2010-11-16 11:07:43 +00:00
parent f7ff9abf99
commit 1aa5a0d1f1
3 changed files with 537 additions and 313 deletions

File diff suppressed because it is too large Load Diff

View File

@ -49,6 +49,8 @@ bool Language::readLanguage(Lexer & lex)
LA_INTERNAL_ENC, LA_INTERNAL_ENC,
LA_LANG_CODE, LA_LANG_CODE,
LA_LANG_VARIETY, LA_LANG_VARIETY,
LA_POLYGLOSSIANAME,
LA_POLYGLOSSIAOPTS,
LA_POSTBABELPREAMBLE, LA_POSTBABELPREAMBLE,
LA_PREBABELPREAMBLE, LA_PREBABELPREAMBLE,
LA_RTL LA_RTL
@ -64,6 +66,8 @@ bool Language::readLanguage(Lexer & lex)
{ "internalencoding", LA_INTERNAL_ENC }, { "internalencoding", LA_INTERNAL_ENC },
{ "langcode", LA_LANG_CODE }, { "langcode", LA_LANG_CODE },
{ "langvariety", LA_LANG_VARIETY }, { "langvariety", LA_LANG_VARIETY },
{ "polyglossianame", LA_POLYGLOSSIANAME },
{ "polyglossiaopts", LA_POLYGLOSSIAOPTS },
{ "postbabelpreamble", LA_POSTBABELPREAMBLE }, { "postbabelpreamble", LA_POSTBABELPREAMBLE },
{ "prebabelpreamble", LA_PREBABELPREAMBLE }, { "prebabelpreamble", LA_PREBABELPREAMBLE },
{ "rtl", LA_RTL } { "rtl", LA_RTL }
@ -98,6 +102,12 @@ bool Language::readLanguage(Lexer & lex)
case LA_BABELNAME: case LA_BABELNAME:
lex >> babel_; lex >> babel_;
break; break;
case LA_POLYGLOSSIANAME:
lex >> polyglossia_name_;
break;
case LA_POLYGLOSSIAOPTS:
lex >> polyglossia_opts_;
break;
case LA_ENCODING: case LA_ENCODING:
lex >> encodingStr_; lex >> encodingStr_;
break; break;

View File

@ -31,29 +31,33 @@ class Language {
public: public:
/// ///
Language() : rightToLeft_(false) {} Language() : rightToLeft_(false) {}
/// /// LyX language name
std::string const & lang() const { return lang_; } std::string const & lang() const { return lang_; }
/// /// Babel language name
std::string const & babel() const { return babel_; } std::string const & babel() const { return babel_; }
/// /// polyglossia language name
std::string const & polyglossia() const { return polyglossia_name_; }
/// polyglossia language options
std::string const & polyglossiaOpts() const { return polyglossia_opts_; }
/// translatable GUI name
std::string const & display() const { return display_; } std::string const & display() const { return display_; }
/// /// is this a RTL language?
bool rightToLeft() const { return rightToLeft_; } bool rightToLeft() const { return rightToLeft_; }
/// /// default encoding
Encoding const * encoding() const { return encoding_; } Encoding const * encoding() const { return encoding_; }
/// ///
std::string const & encodingStr() const { return encodingStr_; } std::string const & encodingStr() const { return encodingStr_; }
/// /// language code
std::string const & code() const { return code_; } std::string const & code() const { return code_; }
/// set code (needed for rc.spellchecker_alt_lang) /// set code (needed for rc.spellchecker_alt_lang)
void setCode(std::string const c) { code_ = c; } void setCode(std::string const c) { code_ = c; }
/// /// language variety (needed by aspell checker)
std::string const & variety() const { return variety_; } std::string const & variety() const { return variety_; }
/// set variety (needed for rc.spellchecker_alt_lang) /// set variety (needed for rc.spellchecker_alt_lang)
void setVariety(std::string const v) { variety_ = v; } void setVariety(std::string const v) { variety_ = v; }
/// /// preamble settings after babel was called
std::string const & babel_postsettings() const { return babel_postsettings_; } std::string const & babel_postsettings() const { return babel_postsettings_; }
/// /// preamble settings before babel is called
std::string const & babel_presettings() const { return babel_presettings_; } std::string const & babel_presettings() const { return babel_presettings_; }
/// This language internally sets a font encoding /// This language internally sets a font encoding
bool internalFontEncoding() const { return internal_enc_; } bool internalFontEncoding() const { return internal_enc_; }
@ -71,6 +75,10 @@ private:
/// ///
std::string babel_; std::string babel_;
/// ///
std::string polyglossia_name_;
///
std::string polyglossia_opts_;
///
std::string display_; std::string display_;
/// ///
bool rightToLeft_; bool rightToLeft_;