Sunday, July 27, 2008

farsi dictonary in ubuntu

for first you need to download Stardic dictionary in ubuntu .
http://wiki.ubuntu-ir.org/MehdiHassanpour/uploads?action=AttachFile&do=get&target=stardict_3.0.0-2_i386.deb

when package downloaded , double click on it and install package using package manager .

Close the Stardict if it's running .

then go to Babylon Glossary Page and download your favorite Glossary .
http://info.babylon.com/glossaries/8F3C/hFarsi___advanced_version.BGL

now you need to convert the bgl file ( bgl is the format of babylon glossary ) . to convert it you need a program call dictconv .
http://3v1n0.tuxfamily.org/pool/feisty/3v1n0/dictconv_0.2-0~3v1ubuntu1_i386.deb
when package downloaded , double click on it and install package using package manager . or (sudo dpkg -i dictconv_0.2-0~3v1ubuntu1_i386.deb)

when you installed dictconv , you should convert bgl file with this command in terminal :
dictconv test.BGL -o test.ifo
(test is the name of your downloded glossary )

the output of this command is three file :

test.ifo , test.idx , test.dict

now type this commands in terminal :
sudo apt-get install dictzip
dictzip test.dict
sudo apt-get install dictzip dictzip test.dict

this will convert your test.dict file to test.dz .
now put these files to a folder same as test :
test.ifo , test.idx , test.dz
then you should copy the " test " folder to Stardict dictionary directory . to do it :
sudo cp -r test /usr/share/stardict/dic
sudo cp -r test /usr/share/stardict/dic

now open Stardict again .