-----------
Requirements:
-----------------
1. Linux/Windows
2. Text editor
3. Goldendict installed
About DSL format:
----------------------
it's abboy lingo's dsl source format; and we can easily create any kind of list into a dictionary.
using dsl:
we can create a telephone directory for us:
joe 1234567
amy 2345678
yogi 3456789
but let's try country-capital first;
Quick start:
--------------
Let's say we start making a word country-capital city dictionary, where we can have country name followed by it's major city or many cities.
let's take data from here: http://geography.about.com/od/countryin ... pitals.htm
-------------
suppose we have only these six countries in our list:
-------------
Afghanistan - Kabul
Albania - Tirane
Algeria - Algiers
Andorra - Andorra la Vella
Angola - Luanda
Antigua and Barbuda - Saint John's
--------------
Now the dictionay dsl format will be like this (observe the header -the first 3 lines):
------------------------------------<file begins here>----------------------
- Code: Select all
#NAME "Country Capital Dictionary [en-en]"
#INDEX_LANGUAGE "English"
#CONTENTS_LANGUAGE "English"
Afghanistan
[m1][trn]Kabul[/trn][/m1]
Albania
[m1][trn]Tirane[/trn][/m1]
Algeria
[m1][trn]Algiers[/trn][/m1]
Andorra
[m1][trn]Andorra la Vella[/trn][/m1]
Angola
[m1][trn]Luanda[/trn][/m1]
Antigua and Barbuda
[m1][trn]Saint John's[/trn][/m1]
------------------------------------<file ends here>----------------------
Now we can save the "dsl" source file as country-capital.dsl and add to goldendictionary dictionaries folder.
Linux/Mac/Unix users:
must convert the file from unix format to windows format, i.e., utf8 to utf16 with crlf terminators; here's how to do it in bash:
Convert utf-8 to utf-16 for dsl dictionary [Linux users]
--------------
sed 's/$'"/`echo \\\r`/" myfile-with-dsl-code.txt > myfile.crlf-added.dsl
iconv -f utf8 myfile.crlf-added.dsl -t utf16 -o myfile.utf16.dsl
Now we can put the myfile.utf16.dsl to golden-dictionary's search path (dictionaries folder).
Finally to save space; we can do compression to the file [Linux users]:
------------
dictzip myfile.utf16.dsl
------------
will get us 'dictzip myfile.utf16.dsl.dz' which is very small file
extract back to dsl.dz dictzipped file format back to .dsl
-----------
dictunzip dictzip myfile.utf16.dsl.dz
and to switch back to utf8 format
-----------
iconv -f myfile.utf16.dsl $file -t utf-8 -o myfile.utf8.step.dsl #utf16 is now utf8 still we have '\r' windows line-terminators
sed 's/\\\r$//g' myfile.utf8.stage1.dsl > myfile.utf8.dsl # now we can edit the file in linux using gedit/kedit etc.
Hope this helps. will add more info. later
Happy creating new dictionaries!