CSS Language must be in dictionary
Posted: Fri Apr 06, 2012 3:09 pm
Hi
I want to style Chinese characters to display bigger and in the font I chose. So I followed the instructions here and added this to article-style.css
It doesn't work, and it seems the language must be set by the dictionary itself. I'm using stardict dictionaries.
Here's the body of a saved article, for the word 'zhongshang'.
As you can see the lang property is empty and the gdlangfrom class is incomplete.
Setting the same font for the entire article won't do. What can I do with the dictionary to make it display as I want it. Do I need to convert it to another dictionary format?
Thanks
D
I want to style Chinese characters to display bigger and in the font I chose. So I followed the instructions here and added this to article-style.css
- Code: Select all
:lang(zh)
{
font-family: "AR PL UMing HK";
font-size: 48px;
}
It doesn't work, and it seems the language must be set by the dictionary itself. I'm using stardict dictionaries.
Here's the body of a saved article, for the word 'zhongshang'.
- Code: Select all
<title>中上</title><script language="JavaScript">function gdMakeArticleActive( newId ) {if ( gdCurrentArticle != 'gdfrom-' + newId ) {document.getElementById( gdCurrentArticle ).className = 'gdarticle';document.getElementById( 'gdfrom-' + newId ).className = 'gdarticle gdactivearticle';gdCurrentArticle = 'gdfrom-' + newId; eval( 'gdActivateAudioLink_' + newId + '();' ); } }</script></head><body><script language="JavaScript">var gdCurrentArticle="gdfrom-ddd286c5b207444bcc9969f3c5dfe86c";</script><script language="JavaScript">var gdArticleContents; if ( !gdArticleContents ) gdArticleContents = "ddd286c5b207444bcc9969f3c5dfe86c "; else gdArticleContents += "ddd286c5b207444bcc9969f3c5dfe86c ";</script><span class="gdarticle gdactivearticle" id="gdfrom-ddd286c5b207444bcc9969f3c5dfe86c" onclick="gdMakeArticleActive( 'ddd286c5b207444bcc9969f3c5dfe86c' );" oncontextmenu="gdMakeArticleActive( 'ddd286c5b207444bcc9969f3c5dfe86c' );"><div class="gddictname"><span class="gdfromprefix">From </span>Hanzi Master 1.3</div><span class="gdarticlebody gdlangfrom-" lang=""><h3>中上</h3><div class="sdct_m">zhongshang [4]</div></span></span></body>
As you can see the lang property is empty and the gdlangfrom class is incomplete.
Setting the same font for the entire article won't do. What can I do with the dictionary to make it display as I want it. Do I need to convert it to another dictionary format?
Thanks
D