mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 23:34:06 +00:00
Show the article in RTL mode if the target language is hebrew (patch by dmdmdm)
Some refinements done by ikm.
This commit is contained in:
parent
689859082c
commit
d431321f3d
|
@ -70,6 +70,13 @@ pre
|
|||
* therefore hidden */
|
||||
.bglpos { display: none; }
|
||||
|
||||
/* Right-to-left text */
|
||||
.bglrtl
|
||||
{
|
||||
text-align: right;
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
/******** StarDict dictionaries' classes *********/
|
||||
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "utf8.hh"
|
||||
#include "chunkedstorage.hh"
|
||||
#include "langcoder.hh"
|
||||
#include "language.hh"
|
||||
|
||||
#include <map>
|
||||
#include <set>
|
||||
|
@ -641,11 +642,16 @@ void BglArticleRequest::run()
|
|||
"</b></b></b></b></b></b></b></b>"
|
||||
"</i></i></i></i></i></i></i></i>";
|
||||
|
||||
static Language::Id hebrew = LangCoder::code2toInt( "he" );
|
||||
|
||||
for( i = mainArticles.begin(); i != mainArticles.end(); ++i )
|
||||
{
|
||||
result += "<h3>";
|
||||
result += postfixToSuperscript( i->second.first );
|
||||
result += "</h3>";
|
||||
if ( dict.idxHeader.langTo == hebrew )
|
||||
result += "<div class=\"bglrtl\">" + i->second.second + "</div>";
|
||||
else
|
||||
result += i->second.second ;
|
||||
result += cleaner;
|
||||
}
|
||||
|
@ -655,6 +661,9 @@ void BglArticleRequest::run()
|
|||
result += "<h3>";
|
||||
result += postfixToSuperscript( i->second.first );
|
||||
result += "</h3>";
|
||||
if ( dict.idxHeader.langTo == hebrew )
|
||||
result += "<div class=\"bglrtl\">" + i->second.second + "</div>";
|
||||
else
|
||||
result += i->second.second ;
|
||||
result += cleaner;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue