* LyX, The Document Processor
*
* Copyright 1995 Matthias Ettrich
- * Copyright 1995-1999 The LyX Team.
+ * Copyright 1995-2000 The LyX Team.
*
* ====================================================== */
#include "lyxrc.h"
#include "language.h"
+using std::ostream;
+using std::endl;
BufferParams::BufferParams()
{
secnumdepth = 3;
tocdepth = 3;
language = "default";
+ language_info = default_language;
fonts = "default";
inputenc = "latin1";
graphicsDriver = "default";
if (lit != languages.end()) {
// found it
language = tmptok;
- return;
- }
- // not found
- language = "default";
- if (tmptok != "default") {
- lyxerr << "Warning: language `"
- << tmptok << "' not recognized!\n"
- << " Setting language to `default'."
- << endl;
+ language_info = &(*lit).second;
+ } else {
+ // not found
+ language = "default";
+ language_info = default_language;
+ if (tmptok != "default") {
+ lyxerr << "Warning: language `"
+ << tmptok << "' not recognized!\n"
+ << " Setting language to `default'."
+ << endl;
+ }
}
}
}
}
}
-
-
-LyXDirection BufferParams::getDocumentDirection() const
-{
- return (lyxrc.rtl_support &&
- (language == "hebrew" || language == "arabic"))
- ? LYX_DIR_RIGHT_TO_LEFT : LYX_DIR_LEFT_TO_RIGHT;
-}