Vietnamese Dictionary 1.0 for Firefox
Any serious computer user lives by Firefox extensions. My copy of Firefox has around 30 installed, and I wouldn’t part with more than five of them. It’s bad enough that I employ the Nightly Tester Tools extension to shove out-of-date extensions down Firefox’s figurative throat and Menu Editor to keep my sprawling Tools menu (the product of 30 extensions) tidy.
I know most of this blog’s readers don’t write in Vietnamese, but for the few who do, I spent a bit of last weekend writing an extension for Firefox and its companion e-mail program, Thunderbird, that checks your Vietnamese spelling as you type. Unlike the last piece of software I released, this one requires hardly any explanation. You know if you need it.
The Vietnamese Dictionary extension provides two spell checking dictionaries: one prefers the newer-style diacritical marks typically used in Vietnam (e.g., xoá), and the other prefers the traditional placement of accent marks (xóa). Both dictionaries can suggest accented words when an unaccented word is entered, as long as the entered word is not recognized by the spell checker.
So if you’re a Vietnamese speaker and don’t have absolutely perfect typing skills, you can add Vietnamese spell checking to your Web browser by downloading this extension:
(XPInstall archive, 51.4 kB)
Clicking the link above will trigger a banner (typically yellow) indicating that Firefox has blocked the installation:
- In Firefox 2, click Edit Options, and in the dialog box that appears, click Allow and Close. Click on the link again, and click Install Now in the dialog box that appears. Finally, restart Firefox. (By clicking Allow, you added notes.1ec5.org to your whitelist. To remove this site from the whitelist, go to the Security tag of the Options or Preferences window, and click the first Exceptions button. In the dialog box that appears, select notes.1ec5.org and click Remove Site.)
- In Firefox 3, click Allow, then click Install Now in the dialog box that appears. Restart Firefox.
To install this extension in Thunderbird, right-click on the link above and select Save Link As. After saving the file to your computer, open Thunderbird, go to the Tools menu, and select Add-ons. Now find the file you downloaded and drag it into the Add-ons window. Finally, click Install Now and restart Thunderbird.
The extension works in Firefox versions 2.0–3.0 and Thunderbird versions 2.0–3.0a1. Please note that the extension doesn’t provide great suggestions in Firefox 2, especially when the word is capitalized, but you can currently download a release candidate of Firefox 3 to see the spell checker in its full glory. (The final release of Firefox 3 is coming later this month.)
Your computer also needs a font capable of displaying the various Vietnamese characters. Most modern operating systems now come with Vietnamese font support.
After installing this extension in Firefox, right-click on any webpage textbox, make sure the “Check Spelling” option is enabled, and select either Vietnamese (New) or Vietnamese (Old) from the Languages submenu.
In Thunderbird, open the Options or Preferences window (Tools ▸ Options… in Windows, or Thunderbird ▸ Preferences… on the Mac). Go to the Composition panel and the Spelling tab beneath it. From here, you can change the spell-checking language to vi-x-New or vi-x-Old. Changing the spell-checking language is considerably easier if you instead install the Dictionary Switcher extension for Thunderbird.
In Firefox 2 and Thunderbird 2, the wordlist is case-sensitive, so any capitalized word is marked as a misspelling, and some words with misplaced diacritical marks are ignored.
This extension was based on a list of entries in the Free Vietnamese Dictionary Project by Hồ Ngọc Đức and a set of rules for generating suggestions in the Vietnamese spell checker for OpenOffice.org by Iván García. Both are licensed under the GNU General Public License. Because the GPL requires any derivative works to be released under the same license, the GPL applies to this extension as well.
In short, that means you’re allowed – actually, encouraged – to download, install, use, tinker with, and share this extension, as long as you don’t forbid others from doing the same.
Building it yourself
svn co http://version.1ec5.org/vi_dictionary/trunk/ svn co http://hunspell-spellcheck-vi.googlecode.com/svn/trunk/ hunspell-spellcheck-vi
git clone https://github.com/1ec5/hunspell-vi.git
Iván and I have merged our projects, so I’ve updated the instructions to checkout from Google Code’s Subversion respository.
Iván and I have agreed to move the project to GitHub, where you can easily propose improvements to the dictionaries.
To package the code as an extension yourself, you can use the included build script, which requires Linux or Mac OS X. In a command line window, navigate to the hunspell-vi/firefox_thunderbird/ directory and execute the following commands:
chmod 755 build.sh
Two installable archives, vi_dictionary.xpi and vi_dictionary_version.xpi should now reside in that directory.
A humble request
I need feedback: you might’ve noticed that the extension is marked as “experimental” at the Firefox Add-ons site. Because Firefox has become so popular lately, Mozilla has implemented a stringent vetting process for new extensions such as mine. In order for the extension to appear “publicly” – that is, for it to be included in the extensions listing and installable without having to log in – I need to demonstrate to Mozilla that the extension is trustworthy.
That’s where you come in. After installing the Vietnamese Dictionary extension, please take a moment to publicly share your thoughts at its Firefox Add-ons entry. Once enough people install and comment on the extension at that page, I’ll be able to nominate it for review.
Finally, if you encounter any correctly spelled words that the extension wrongly marks as incorrect, please
leave a comment at the Errata page .
I hope this extension makes your day-to-day Web browsing a tad easier. Maybe it’ll even be one of your 25 can’t-live-without extensions.