Difference between revisions of "Adding new dictionaries to aspell"

m
(Updating this document to be accurate to Zimbra 8.7, and removing some old 4.X text which is no longer relevant.)
 
(23 intermediate revisions by 13 users not shown)
Line 1: Line 1:
== How to add a new dictionary to aspell ==
+
=Adding new dictionaries to aspell=
 +
<div class="col-md-12 ibox-content">
 +
{{KB|{{Unsupported}}|{{ZCS 8.7}}||}}
  
 +
ZCS 8.7 comes with dictionaries preinstalled for many languages.  ZCS versions 5.0 and earlier only have English installed.  To see the list of installed languages, run
 +
/opt/zimbra/common/bin/aspell dump dicts
  
* Download the dictionary from [ftp://ftp.gnu.org/gnu/aspell/dict gnu.org]
+
If you do not see your language in the list, follow the instructions below.
* Extract it from the tar file in a work directory
 
* Set Zimbra's aspell in the path with:
 
::<tt>PATH=/opt/zimbra/aspell-0.60.3/bin:$PATH</tt>
 
* Configure and install the dictionary according to the README
 
<tt>
 
::./configure
 
::make
 
::make install
 
</tt>
 
  
* Edit the file /opt/zimbra/httpd/htdocs/aspell.php to reference the new dictionary.  For example to add the french dictionary:
+
== How to add a new dictionary to aspell ==
 
+
* Download the dictionary for the language you want from [ftp://ftp.gnu.org/gnu/aspell/dict ftp.gnu.org/gnu/aspell/dict].
<tt>
+
* Extract it from the tar file in a temporary directory.
::$dictionary = pspell_new("en_EN");
+
* Set PATH to the binary directory of Zimbra:
::TO
+
PATH=/opt/zimbra/common/bin:$PATH
::$dictionary = pspell_new("fr_FR");
+
* Configure and install the dictionary according to the README:
</tt>
 
 
 
 
 
 
 
<b>NOTE:</b> If you are using a non-english based language with special chars like tildes (spanish, for example), you have to modify aspell.php
 
 
 
This file is located at /opt/zimbra/httpd/htdocs/aspell.php. Replace this block (line 82 or so)
 
 
 
<pre><nowiki>
 
$suggestions = implode(",", pspell_suggest($dictionary, $word));
 
$misspelled .= "$word:$suggestions\n";
 
</nowiki></pre>
 
 
 
with this one:
 
<pre><nowiki>
 
$suggestions = implode(",", pspell_suggest($dictionary, $word));
 
$suggestions=iconv("iso-8859-1","UTF-8",$suggestions);
 
$misspelled .= "$word:$suggestions\n";
 
</nowiki></pre>
 
 
 
There is also a problem when splitting words. Replace (line 48 or so)
 
<pre><nowiki>
 
$words = preg_split('/[^\w\'-]+/', $text);
 
</nowiki></pre>
 
 
 
with this one:
 
<pre><nowiki>
 
$words = preg_split('/[^\w\'-\xc0-\xfd-]+/', $text);
 
</nowiki></pre>
 
 
 
This regexp line should be enough for most western Europe languages (Spanish, French, German, Portuguese and Italian). It includes all ISO8859 europeean letters in the range 192-253 of the table below.
 
 
 
http://www.pemberley.com/janeinfo/latin1.gif
 
  
 +
./configure
 +
make
 +
make install
  
* To add a set of custom words see this [http://aspell.sourceforge.net/man-html/Creating-an-Individual-Word-List.html How-To]
+
* Verify the datadir and dictdir it must be '''/opt/zimbra/common/lib/aspell-0.60'''
  
 +
You must reload the spell-service:
 +
sudo -u zimbra /opt/zimbra/bin/zmspellctl reload
  
 +
{{Article_Footer|Zimbra Collaboration Suite 8.7|3/9/2017}}
  
[http://www.casino-games-wiki.com/index.php/casino_games_game casino games game]
+
[[Category:Spell]]
[http://www.casino-theory.com/online-casino-royale/strategy-online-casino.html strategy online casino]
+
[[Category:Customizing ZCS]]
[http://www.gambling-online-theory.com/online-casino/online-casino-for-cash.html online casino for cash]
 
[http://www.gambling-online-theory.com/casinos/casinos-strategy.html casinos strategy]
 
[http://www.casino-theory.com/online-casino-bonus/index.html online casino bonus]
 
[http://www.casino-games-wiki.com/index.php/on_line_casino_games on line casino games]
 
[http://www.casino-games-wiki.com/index.php/online_casino_games online casino games]
 
[http://www.casino-games-wiki.com/index.php/online_casino_games online casino games]
 
[http://www.gambling-online-theory.com/online-casino/online-casino-for-cash.html online casino for cash]
 
[http://www.gambling-online-theory.com/fortune-roulette/on-line-roulette-game.html on line roulette game]
 

Latest revision as of 13:05, 9 March 2017

Adding new dictionaries to aspell

   KB 1295        Last updated on 2017-03-9  




0.00
(0 votes)

ZCS 8.7 comes with dictionaries preinstalled for many languages. ZCS versions 5.0 and earlier only have English installed. To see the list of installed languages, run

/opt/zimbra/common/bin/aspell dump dicts

If you do not see your language in the list, follow the instructions below.

How to add a new dictionary to aspell

  • Download the dictionary for the language you want from ftp.gnu.org/gnu/aspell/dict.
  • Extract it from the tar file in a temporary directory.
  • Set PATH to the binary directory of Zimbra:
PATH=/opt/zimbra/common/bin:$PATH
  • Configure and install the dictionary according to the README:
./configure
make
make install
  • Verify the datadir and dictdir it must be /opt/zimbra/common/lib/aspell-0.60

You must reload the spell-service:

sudo -u zimbra /opt/zimbra/bin/zmspellctl reload
Verified Against: Zimbra Collaboration Suite 8.7 Date Created: 3/9/2017
Article ID: https://wiki.zimbra.com/index.php?title=Adding_new_dictionaries_to_aspell Date Modified: 2017-03-09



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Jump to: navigation, search