Changes

Jump to: navigation, search

Thunderbird

3,378 bytes added, 13:25, 16 May 2013
Silent installation of dictionaries (spell-checking)
= Silent installation of dictionaries (spell-checking) =
== Thunderbird 17 (32 & 64 bits OS) ==
 
Mozilla Thunderbird keeps its (MySpell) dictionaries in <code>%PROGRAMFILES%\Mozilla Thunderbird\components\myspell\</code> or <code>%PROGRAMFILES(x86)%\Mozilla Thunderbird\components\myspell\</code>.
 
By default, it only has an English dictionary (for [http://weblogs.mozillazine.org/ben/archives/016618.html licensing reasons]).
 
Installing a new dictionary is simple - just copy the dictionary files for a given language to that folder.
 
===Installing a Spanish dictionary===
 
* Download a Spanish dictionary from https://addons.mozilla.org/en-US/thunderbird/addon/spanish-spain-dictionary/
* The file is a .xpi file (a renamed .zip file). Uncompress it using any unzipping program. Inside you'll find .aff and .dic files - these are the core dictionary files. (There is also a .txt file (some info), and a .js file (the installer, used if you install the dictionary using Thunderbird))
* For this to get work with 32 and 64 bits OS run the script below to opy the core dictionary files into <code>%PROGRAMFILES%\Mozilla Thunderbird\components\myspell\</code> or <code>%PROGRAMFILES(x86)%\Mozilla Thunderbird\components\myspell\</code>.
* The WPKG installer to install this dictionary into Thunderbird should look like this:
 
<source lang="xml">
<package
id="thunderbird-spanish-dic"
name="Español para Thunderbird"
revision="1"
reboot="false"
priority="0">
<check type="file" condition="exists" path="%PROGRAMFILES%\Mozilla Thunderbird\components\myspell\Deutsch - neue Rechtschreibung.aff" />
<check type="file" condition="exists" path="%PROGRAMFILES%\Mozilla Thunderbird\components\myspell\Deutsch - neue Rechtschreibung.dic" />
<check type="file" condition="exists" path="%PROGRAMFILES%\Mozilla Thunderbird\components\myspell\Deutsch - neue Rechtschreibung.txt" />
<install cmd='cscript "%SOFTWARE%\thunderbird\extensions\dictionaries\es-ES.js" install' />
<upgrade cmd='cscript "%SOFTWARE%\thunderbird\extensions\dictionaries\es-ES.js" install' />
<remove cmd='cscript "%SOFTWARE%\thunderbird\extensions\dictionaries\es-ES.js" remove' />
</package>
</source>
 
 
* And the script to verifiy version of OS and copy the dictionaries should look like this:
 
 
<source lang="javascript">
var WshShell = WScript.CreateObject("WScript.Shell");
var programfiles;
var option;
var software;
software = WshShell.ExpandEnvironmentStrings("%SOFTWARE%")
 
if (WshShell.ExpandEnvironmentStrings("%PROCESSOR_ARCHITECTURE%") == "AMD64")
programfiles = WshShell.ExpandEnvironmentStrings("%ProgramFiles(x86)%");
else
programfiles = WshShell.ExpandEnvironmentStrings("%ProgramFiles%")
 
option = WScript.Arguments.Item(0)
 
switch (option)
{
case "install":
WshShell.exec('xcopy /Q /I /E /Y "' + software + '\\thunderbird\\extensions\\dictionaries\\es-ES.aff" "' + programfiles + '\\Mozilla Thunderbird\\components\\myspell\\"');
WshShell.exec('xcopy /Q /I /E /Y "' + software + '\\thunderbird\\extensions\\dictionaries\\es-ES.dic" "' + programfiles + '\\Mozilla Thunderbird\\components\\myspell\\"');
break;
case "remove":
WshShell.exec('cmd /C del /Q "' + programfiles + '\\Mozilla Thunderbird\\components\\myspell\\es-ES.aff"');
WshShell.exec('cmd /C del /Q "' + programfiles + '\\Mozilla Thunderbird\\components\\myspell\\es-ES.dic"');
break;
default :
;
}
</source>
== Thunderbird 1.5 ==
Anonymous user

Navigation menu