1 /*******************************************************************************
2 * Copyright (c) 2000, 2003 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v10.html
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
12 package net.sourceforge.phpdt.internal.ui.text.spelling.engine;
14 import java.net.MalformedURLException;
16 import java.util.Locale;
18 import net.sourceforge.phpdt.internal.ui.PHPUIMessages;
21 * Platform wide read-only locale sensitive dictionary for spell-checking.
25 public class LocaleSensitiveSpellDictionary extends AbstractSpellDictionary {
27 /** The locale of this dictionary */
28 private final Locale fLocale;
30 /** The location of the dictionaries */
31 private final URL fLocation;
34 * Creates a new locale sensitive spell dictionary.
37 * The locale for this dictionary
39 * The location of the locale sensitive dictionaries
41 public LocaleSensitiveSpellDictionary(final Locale locale,
48 * Returns the locale of this dictionary.
50 * @return The locale of this dictionary
52 public final Locale getLocale() {
57 * @see net.sourceforge.phpdt.internal.ui.text.spelling.engine.AbstractSpellDictionary#getURL()
59 protected final URL getURL() throws MalformedURLException {
62 fLocale.toString().toLowerCase()
63 + "." + PHPUIMessages.getString("Spelling.dictionary.file.extension")); //$NON-NLS-1$ //$NON-NLS-2$