diff --git a/src/article-style.css b/src/article-style.css index 8feb028d..c624fabb 100644 --- a/src/article-style.css +++ b/src/article-style.css @@ -70,6 +70,13 @@ pre * therefore hidden */ .bglpos { display: none; } +/* Right-to-left text */ +.bglrtl +{ + text-align: right; + direction: rtl; +} + /******** StarDict dictionaries' classes *********/ diff --git a/src/bgl.cc b/src/bgl.cc index e4db6a93..68298b85 100644 --- a/src/bgl.cc +++ b/src/bgl.cc @@ -9,6 +9,7 @@ #include "utf8.hh" #include "chunkedstorage.hh" #include "langcoder.hh" +#include "language.hh" #include #include @@ -641,21 +642,29 @@ void BglArticleRequest::run() "" ""; + static Language::Id hebrew = LangCoder::code2toInt( "he" ); + for( i = mainArticles.begin(); i != mainArticles.end(); ++i ) { result += "

"; result += postfixToSuperscript( i->second.first ); result += "

"; - result += i->second.second; + if ( dict.idxHeader.langTo == hebrew ) + result += "
" + i->second.second + "
"; + else + result += i->second.second ; result += cleaner; } - + for( i = alternateArticles.begin(); i != alternateArticles.end(); ++i ) { result += "

"; result += postfixToSuperscript( i->second.first ); result += "

"; - result += i->second.second; + if ( dict.idxHeader.langTo == hebrew ) + result += "
" + i->second.second + "
"; + else + result += i->second.second ; result += cleaner; } // Do some cleanups in the text