1ENCHANT(5) File Formats Manual ENCHANT(5)
2
3
4
6 Enchant - enchant ordering files and personal word lists
7
9 Enchant uses global and per-user ordering files named enchant.ordering
10 to decide which spelling provider to use for particular languages. The
11 per-user file takes precedence.
12
13 The ordering file takes the form language_tag:<comma-separated list of
14 spelling providers>. The language tag is an IETF BCP 47 language tag,
15 typically of the form COUNTRY_LANGUAGE. To see what dictionaries are
16 available, run enchant-lsmod-2. ‘*’ is used to mean “use this ordering
17 for all languages, unless instructed otherwise.” For example:
18
19 *:aspell,hunspell,nuspell
20 en:aspell,hunspell,nuspell
21 en_GB:hunspell,nuspell,aspell
22 fr:hunspell,nuspell,aspell
23
25 Personal word lists are simple plain text files with one word per line.
26 Lines starting with a hash sign ‘#’ are ignored.
27
28 SHARING PERSONAL WORD LISTS BETWEEN SPELL-CHECKERS
29 It is possible, and usually safe, to share Enchant’s personal word
30 lists with other spelling checkers that use the same format (note that
31 other spell-checkers may not support comments!). The spell-checkers
32 known to be compatible are Hunspell, Nuspell and Ispell. (Although En‐
33 chant does not support Ispell as a back-end, it’s still fine to share
34 word lists with it.) Other spell-checkers supported by Enchant are ei‐
35 ther incompatible, or have no personal word list mechanism. There may
36 well be yet other spell-checkers, unknown to Enchant, that use the same
37 format.
38
39 Some applications use Hunspell or Nuspell, but store the personal word
40 list under another name or in another location. Firefox is one example.
41 Firefox also seems to reorder its word list when updating it; again,
42 this is OK, as the result is still in the same format. Anonther example
43 is Thunderbird.
44
45 To share word lists with Enchant, find the other spelling checker’s
46 word list file, e.g. ~/.hunspell_fr_FR or ~/.config/nuspell/fr_FR, and
47 merge it with the corresponding Enchant file, in this case ~/.con‐
48 fig/enchant/fr_FR.dic. Use the following command, replacing ENCHANT-
49 DICT and OTHER-DICT with the corresponding dictionary file names:
50
51 cat ENCHANT-DICT OTHER-DICT | sort -u > merged.txt
52
53 Take a look at merged.txt to check the merge has worked, then
54
55 mv merged.txt ENCHANT-DICT
56 rm OTHER-DICT
57 ln -s OTHER-DICT ENCHANT-DICT
58
59 to replace the other dictionary file with a link to the Enchant dictio‐
60 nary, again filling in the name of the dictionary files.
61
63 Enchant looks in the following places for files, in decreasing order of
64 precedence:
65
66 ENCHANT_CONFIG_DIR
67 (If the environment variable is set.)
68
69 XDG_CONFIG_HOME/enchant (non-Windows systems)
70 Default: ~/.config/enchant
71
72 CSIDL_LOCAL_APPDATA\enchant (Windows systems)
73 Default: C:\Documents and Settings\username\Local Settings\Ap‐
74 plication Data\enchant
75
76 DATADIR/enchant
77 (Or the equivalent location relative to the enchant library for
78 a relocatable build.)
79
80 Dictionaries are looked for in a subdirectory with the same name as the
81 provider; for example, DATADIR/enchant/hunspell and ~/.config/en‐
82 chant/hunspell.
83
84 Some providers may also look in a standard system directory for their
85 dictionaries; the hunspell provider can be configured to do so at build
86 time.
87
89 enchant-2(1), enchant-lsmod-2(1)
90
92 Written by Dom Lachowicz and Reuben Thomas.
93
94
95
96 ENCHANT(5)