#include "support/lyxlib.h"
#include "support/lstrings.h"
#include "lyxrc.h"
+#include "language.h"
extern LyXRC * lyxrc;
if (!lex.next()) return;
string tmptok = lex.GetString();
+#if 0
string test;
int n = 0;
+#endif
// check if tmptok is part of tex_babel in tex-defs.h
+ Languages::iterator lit = languages.find(tmptok);
+ if (lit != languages.end()) {
+ // found it
+ language = tmptok;
+ return;
+ }
+ // not found
+ lyxerr << "Warning: language `"
+ << tmptok << "' not recognized!\n"
+ << " Setting language to `default'."
+ << endl;
+ language = "default";
+
+#if 0
while (true) {
test = tex_babel[n++];
break;
}
}
+#endif
}
LyXDirection BufferParams::getDocumentDirection() const
{
- return (lyxrc->rtl_support && language == "hebrew")
+ return (lyxrc->rtl_support &&
+ (language == "hebrew" || language == "arabic"))
? LYX_DIR_RIGHT_TO_LEFT : LYX_DIR_LEFT_TO_RIGHT;
}