New user registration is currently disabled due to spam abuse / Регистрация новых пользователей в настоящее время приостановлена из-за злоупотреблений спаммерами

Specifying language in .dsl dictionaries

All about dictionaries

Specifying language in .dsl dictionaries

Postby det » Mon Sep 27, 2010 11:15 am

I'm having trouble getting language-specific fonts to display in my Bengali-English dictionary (using article-style.css as in http://goldendict.org/wiki/index.php/FAQ), and I wonder if I am specifying the language correctly.

With the following dsl dictionary header, GD seems to pick up the languages correctly (the Bangladesh flag is displayed in the dictionary list).

Code: Select all
#NAME "Bengali-English Dictionary (v 0.4) [bn-en]"
#INDEX_LANGUAGE "Bengali"
#CONTENTS_LANGUAGE "English"

But then what do I need to ensure that headwords and other Bengali text is recognized? If all English is enclosed in [trn]...[/trn], is that enough -- is all text outside the [trn] tags assumed to be Bengali? Or do I also need to use the [lang] tags around the Bengali? If so, where can I look up the language ID ([lang id=xxxxx])?

(Using GD 0.9.0+git on linux - Ubuntu 10.04; also tried this on Windows Vista)
det
 
Posts: 37
Joined: Fri Jul 23, 2010 7:22 am

Re: Specifying language in .dsl dictionaries

Postby det » Sat Nov 13, 2010 3:33 pm

After reinstalling with Ubuntu 10.10, the language-specific font shows in the main dictionary result pane. But the search bar and the list words below it are not in the specified font. Is there anything I can do to get those to also display in my desired Bengali font?
det
 
Posts: 37
Joined: Fri Jul 23, 2010 7:22 am

Re: Specifying language in .dsl dictionaries

Postby ikm » Sat Nov 13, 2010 4:59 pm

Yes, you can create qt-style.css file in your ~/.goldendict and adjust settings there. See qt-style.css in the goldendict source code tree to get a clue on how the default one looks like.
ikm
Автор GoldenDict
 
Posts: 1595
Joined: Wed Feb 04, 2009 10:40 am

Re: Specifying language in .dsl dictionaries

Postby det » Mon Nov 15, 2010 9:25 am

Thank you! Adding the font properties to the first section of qt-style.css got my desired font in the search bar and wordlist:

Code: Select all
MainWindow #searchPane #translateLine, MainWindow #searchPane #wordList
{
  background: white;
  color: black;
  font-family: "SolaimanLipi";
  font-size: 20px;
}

But it would be preferable if this font was just used for Bangla, and the default one was used for English. How would I add that conditional?

Also, for the article rendering: is it currently possible to use different fonts for different languages in the same article? At the moment with following edits to article-style.css (described in the Wiki), font changes are applied to the whole article, not to a specific language within the article.

Code: Select all
:lang(bn), .gdlangfrom-bn
{
  font-family: "SolaimanLipi";
  font-size: 20px;
}
det
 
Posts: 37
Joined: Fri Jul 23, 2010 7:22 am

Re: Specifying language in .dsl dictionaries

Postby ikm » Mon Nov 15, 2010 3:27 pm

Ok, I've just added this feature. Using the latest Git, do like this:

Code: Select all
MainWindow #searchPane #translateLine[currentGroup="En"], MainWindow #searchPane #wordList[currentGroup="En"]
{
  background: white;
  color: black;
  font-size: 20px;
}

Would you mind describing this new piece of functionality at Wiki FAQ?
ikm
Автор GoldenDict
 
Posts: 1595
Joined: Wed Feb 04, 2009 10:40 am

Re: Specifying language in .dsl dictionaries

Postby det » Tue Nov 16, 2010 10:39 am

I couldn't get this working. I copied your code, just replacing "En" with my group names (trying both 'English' and 'Bengali', as well as the 2-letter language codes). Changes showed up when the [currentGroup="En"] property was left out, but not when it is included. Anything else I can try, or any debugging suggestions?
det
 
Posts: 37
Joined: Fri Jul 23, 2010 7:22 am

Re: Specifying language in .dsl dictionaries

Postby ikm » Tue Nov 16, 2010 9:03 pm

Are you sure you were using the very latest Git?
ikm
Автор GoldenDict
 
Posts: 1595
Joined: Wed Feb 04, 2009 10:40 am

Re: Specifying language in .dsl dictionaries

Postby det » Wed Nov 17, 2010 6:54 am

ok - I had built the latest git, but had not done 'make install' so was actually using the old one...whoops. Now it's working fine, and I have edited the wiki FAQ page. The one thing that is missing there is a note on where to get the qt-style.css from initially. I don't remember exactly now, but I don't think it was in my home directory to start with...
det
 
Posts: 37
Joined: Fri Jul 23, 2010 7:22 am

Re: Specifying language in .dsl dictionaries

Postby rezwansaki » Wed Jan 12, 2011 11:07 am

Please, can anyone give me a English-Bengali dictionary database file for 'GoldenDict' ?
Please, help me.
rezwansaki
 
Posts: 3
Joined: Wed Jan 12, 2011 8:46 am

Re: Specifying language in .dsl dictionaries

Postby det » Thu Jan 13, 2011 8:33 am

rezwansaki - I'm afraid I don't yet have anything with a public license that I can give out... but perhaps I will later. If you get hold of anything, please let me know.
det
 
Posts: 37
Joined: Fri Jul 23, 2010 7:22 am

Next

Return to Dictionaries

Who is online

Users browsing this forum: No registered users and 15 guests