/dictionary

An online dictionary reader for StarDict format

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

Dictionary

A web dictionary reader

image

๐Ÿ”— Offline Mode

If you have already downloaded these files, you could use this dictionary offline.

  1. Press upload
  2. Select your dictionary files. It should consist of more than 3 files. See here for more information
  3. Search words to know!

๐ŸŒ Online Mode

It is also possible to store dictionaries on your server and download them when loaded. To install custom dictionaries:

  1. Install a web server, I recommend XAMPP which includes Apache
  2. Clone this project and extract to web root
  3. Sort your dictionary files like this
dictionary
โ”œโ”€โ”€ YourDict1
โ”‚   โ”œโ”€โ”€ YourDict1.dict.dz
โ”‚   โ”œโ”€โ”€ YourDict1.idx
โ”‚   โ””โ”€โ”€ YourDict1.ifo
โ””โ”€โ”€ YourDict2
    โ”œโ”€โ”€ YourDict2.dict.dz
    โ”œโ”€โ”€ YourDict2.idx
    โ””โ”€โ”€ YourDict2.ifo
    โ””โ”€โ”€ YourDict2.syn
  1. Open data.js. It contains a single object called "languages". Change the key to your language, and the dictionary name (i.e. YourDict1) to its value so it looks like this:
const languages = {
    English: "YourDict1",
    French: "YourDict2",
}
  1. Add "?lang=English" or whatever language name you put in data.js at the end of the URL. If you are hosting the file locally, the URL should be something like
http://localhost/dictionary/?lang=English
  1. It might take a while to load as dictionaries can get pretty big

๐Ÿ•ฎ StarDict

We use the StarDict format to parse dictionaries. The StarDict format is an open source format created by StarDict, and consists of 3 or 4 files: dictionary.dict.dz, dictionary.idx, dictionary.ifo and optionally dictionary.syn. I have included some dictionaries but it wouldn't be of much use unless you study classics

  • English: Oxford Advanced Learner's Dictionary
  • Latin: A Latin Dictionary, Lewis & Short
  • Ancient Greek: A Greekโ€“English Lexicon, Liddell & Scott

Credits

Many thanks for those who made the following libraries. This project wouldn't be possible without their hard work.