diff -Nru src/org/omegat/core/spellchecker/SpellCheckerHunspell.java src/org/omegat-gil/core/spellchecker/SpellCheckerHunspell.java --- src/org/omegat/core/spellchecker/SpellCheckerHunspell.java 2011-01-18 16:34:24.000000000 +0100 +++ src/org/omegat-gil/core/spellchecker/SpellCheckerHunspell.java 2011-03-10 19:25:03.000000000 +0100 @@ -76,8 +76,7 @@ libraryPath = Native.getWebStartLibraryPath(OConsts.SPELLCHECKER_LIBRARY_NAME) + File.separator + mapLibraryName(OConsts.SPELLCHECKER_LIBRARY_NAME); } else { - libraryPath = StaticUtils.installDir() + File.separator + OConsts.NATIVE_LIBRARY_DIR - + File.separator + mapLibraryName(OConsts.SPELLCHECKER_LIBRARY_NAME); + libraryPath = OConsts.SPELLCHECKER_LIBRARY_PATH; } hunspell = (Hunspell) Native.loadLibrary(libraryPath, Hunspell.class); diff -Nru src/org/omegat/core/spellchecker/SpellChecker.java src/org/omegat-gil/core/spellchecker/SpellChecker.java --- src/org/omegat/core/spellchecker/SpellChecker.java 2011-03-10 19:21:01.000000000 +0100 +++ src/org/omegat-gil/core/spellchecker/SpellChecker.java 2011-03-10 19:30:24.000000000 +0100 @@ -115,7 +115,9 @@ // initialize the spell checker - get the data from the preferences String language = Core.getProject().getProjectProperties().getTargetLanguage().getLocaleCode(); - String dictionaryDir = Preferences.getPreference(Preferences.SPELLCHECKER_DICTIONARY_DIRECTORY); + String dictionaryDir = Preferences.getPreferenceDefault( + Preferences.SPELLCHECKER_DICTIONARY_DIRECTORY, + OConsts.SPELLCHECKER_SYSTEM_DICTIONARY_DIRECTORY); if (dictionaryDir != null) { String affixName = dictionaryDir + File.separator + language + OConsts.SC_AFFIX_EXTENSION; diff -Nru src/org/omegat/util/OConsts.java src/org/omegat-gil/util/OConsts.java --- src/org/omegat/util/OConsts.java 2011-03-10 19:21:01.000000000 +0100 +++ src/org/omegat-gil/util/OConsts.java 2011-03-10 19:28:04.000000000 +0100 @@ -102,6 +102,12 @@ /** The name of the spell checking library */ public static final String SPELLCHECKER_LIBRARY_NAME = "hunspell"; + /** the path of the spell checking library */ + public static final String SPELLCHECKER_LIBRARY_PATH = "/usr/lib/libhunspell-1.2.so.0"; + + /** directory of system dictionaries */ + public static final String SPELLCHECKER_SYSTEM_DICTIONARY_DIRECTORY = "/usr/share/myspell/"; // NOI18N + /** the native library directory */ public static final String NATIVE_LIBRARY_DIR = "native";