ACC SHELL
<html lang="en">
<head>
<title>How Aspell Selects an Appropriate Dictionary - GNU Aspell 0.60.6</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="description" content="Aspell 0.60.6 spell checker user's manual.">
<meta name="generator" content="makeinfo 4.8">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Working-With-Dictionaries.html#Working-With-Dictionaries" title="Working With Dictionaries">
<link rel="prev" href="Using-aspell_002dimport.html#Using-aspell_002dimport" title="Using aspell-import">
<link rel="next" href="Listing-Available-Dictionaries.html#Listing-Available-Dictionaries" title="Listing Available Dictionaries">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This is the user's manual for Aspell
GNU Aspell is a spell checker designed to eventually replace Ispell.
It can either be used as a library or as an independent spell checker.
Copyright (C) 2000--2006 Kevin Atkinson.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
Version 1.1 or any later version published by the Free Software
Foundation; with no Invariant Sections, no Front-Cover Texts and
no Back-Cover Texts. A copy of the license is included in the
section entitled "GNU Free Documentation License".
-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="How-Aspell-Selects-an-Appropriate-Dictionary"></a>
Next: <a rel="next" accesskey="n" href="Listing-Available-Dictionaries.html#Listing-Available-Dictionaries">Listing Available Dictionaries</a>,
Previous: <a rel="previous" accesskey="p" href="Using-aspell_002dimport.html#Using-aspell_002dimport">Using aspell-import</a>,
Up: <a rel="up" accesskey="u" href="Working-With-Dictionaries.html#Working-With-Dictionaries">Working With Dictionaries</a>
<hr>
</div>
<h3 class="section">5.2 How Aspell Selects an Appropriate Dictionary</h3>
<p>If the <samp><span class="option">master</span></samp> option is set in any fashion (via the command
line, the <samp><span class="env">ASPELL_CONF</span></samp> environment variable, or a configuration
file) Aspell will look for a dictionary of that name. If one could
not be found, it will complain.
<p>Otherwise it will use the value of the <samp><span class="option">lang</span></samp> option to search
for an appropriate dictionary. If more than one dictionary is found
for the given language string then it will look for a dictionary with
a matching variety if the <samp><span class="option">variety</span></samp> option is set. If it is not
set it will look for a dictionary without a variety. If after matching
the <samp><span class="option">lang</span></samp> and <samp><span class="option">variety</span></samp> there is still more than one
dictionary available it will find one with the size closest to the
value of the <samp><span class="option">size</span></samp> option. The default size is 60. If Aspell
cannot find a dictionary based on the <samp><span class="option">lang</span></samp> option then it
will give up and complain.
<p>If the <samp><span class="option">lang</span></samp> option is not explicitly set its value will be
based on the <samp><span class="env">LC_MESSAGES</span></samp> locale. This locale is generally taken
from the <samp><span class="env">LC_MESSAGES</span></samp> environment variable or the <samp><span class="env">LANG</span></samp>
environment variable if <samp><span class="env">LC_MESSAGES</span></samp> is not set. However, if
Aspell is being used as a library from within another program which
already explicitly set the locale then it will use the locale of the
library rather than the environment variables. If Aspell cannot
determine the language from the <samp><span class="env">LC_MESSAGES</span></samp> locale than it will
default to <code>en_US</code>.
<p>The list option <samp><span class="option">dict-alias</span></samp> can be used to influence which dictionary
is selected by creating an alias from one dictionary name to another.
This option is most useful when there is more than one dictionary for a
given language. For example `<samp><span class="samp">add-dict-alias en_US en_US-w_accents</span></samp>'
will cause Aspell to choose the accented version of the American English
dictionary instead of the non-accented version. To add an alias use:
<pre class="example"> add-dict-alias <var>NAME</var> <var>VAL</var>
</pre>
</body></html>
ACC SHELL 2018