Writing Tools Series Lotech Solutions ( Jump to site home pagewww.lotechsolutions.com)

Languages and Spelling in Expression Web

Topic status automatically displays here - do not remove.

Bookmark me!Bookmark this topic  Print me!Print this topic

By Colin Ramsden, November 2006.

The internet provides us with an international audience, which are using a multitude of Operating Systems (OS), versions, and languages. Microsoft (MS) publish their products in multiple regions, and have built-in multi-language support for their Windows OS and programs. If you happen to live in a region where multiple languages co-exist, (such as in Canada, in Europe, in the Middle East, or in Asia for example) you most likely already utilise this multi-language support functionality.

If you don't have the need to use multiple languages on your computer, you should at least be aware that in-built support for multiple languages most likely already exists in your computer's operating system.

In MS Windows XP (2002) for example, you can view your system language settings under:
Start>Control Panel>Regional and Language Options.
On the Languages tab, click on the Details button.
This displays the 'Text Services and Input Languages' properties dialog:

Windows Text Services and Input Languages dialog

As you can see, by default (because I haven't ever changed it), US English is selected as my computer's "default input language". Up until now, that hasn't been a problem for me, and I've given it no concern. However, now that I'm using Expression Web (EW), the matter of keyboard language has been brought to my attention.

Back to Top

What's the problem?

When using EW, I enter my topic text in the 'Design' pane of 'Split view', whilst watching (checking) the resultant HTML code displayed in the 'Code' pane. I really like this dual display functionality, as it appeals to the geek in me.

I observed that suddenly, and unexpectantly, EW was wrapping the text with Span tags declaring a different language (presumably, to the declared language of the page or the editor?). See the following example HTML code:

<span lang="en-us">This text has an assigned language</span>

I wasn't sure how this happened or why it would suddenly start. EW hadn't done that before—at least not that I had noticed. (Come to think of it, I've observed this behaviour in FrontPage before, but I didn't know what caused it.)

Back to Top

Diagnosing the cause

A search for "language" in the EW Help produced a myriad of results. It appears that there are many "language" settings—for the site, for a page, for text selections, and for spell-checking. Before I can isolate the cause of the problem, I need to understand more about the possibilities. The following is a brief description of my findings:

As you enter text in design view, the spell checker applies the language of the computer system's keyboard to the text. If the keyboard language matches that declared for the page, no text language tagging is required. If no language is declared for the page, EW defers to the language for the Page editor, which defaults to (US English).

For example, if your keyboard language is set to US English, as mine was, the text is tagged as US English and the spelling is checked based on that language. At least, I think that's how it works.

My problem was that I set the page language to Australian (en-au), then observed that the text I entered was being tagged as US English (en-us) language—as described and exampled in "What's the problem?" above.

By experimentation, I found that if I changed the page language declaration to "US English", this caused the text language tagging to stop. However, I wanted to use Australian spelling on my website, using an Australian dictionary, not a US based one. This has led to the current situation.


Back to Top

To nominate the language of a page

In EW, select File>Properties>Language tab>Mark current document as:

Page Properties Language tab

Back to Top

To set the spell-checking dictionary language:

In EW, select Tools>Page Editor Options>General tab>Default Page Language.

Back to Top

To check spelling as you type:

In EW, select Tools>Page Editor Options>General tab>Spelling Options>Check spelling as you type.

Back to Top

To highlight misspelled words:

In EW, select Tools>Page Editor Options>General tab>Spelling Options>Hide spelling errors.

Expression Web Spelling Options dialog

Back to Top

Looking for a solution

I've identified the cause of the problem as being a conflict between the computer keyboard language and the page language declaration. They need to match, in order to prevent unnecessary code bloat with text language tags. Only it's not obvious how to see which language the keyboard is using.

It does appear that EW comes with the option to "Automatically switch the language of the keyboard to match the surrounding text" in a topic. In EW, select Tools>Page Editor Options>General tab>Automatically switch keyboard to match language of surrounding text:

Expression Web Page Editor Options dialog - general properties

Only I don't quite understand how this is meant to work. Text that is already tagged as "US English" is continuing. How do I determine which language is currently being used? I'd like to know what's happening, and not leave it to chance.

An examination of the Windows 'Text Services and Input Languages' properties dialog (illustrated in this topic's introduction section above) showed a Language Bar button, which launched the 'Language Bar Settings' dialog:

Windows Language Bar Settings

I notice that the 'Language bar' icons were enabled for display in the taskbar, but I couldn't see any on my taskbar. Right-clicking on (an unused portion of) the Windows taskbar listed the Language bar toolbar as highlighted:

Windows Taskbar menu

Checking it caused the display of the 'Language bar' on the Windows taskbar as highlighted above. However, it removed itself soon after, so that wasn't very helpful. I reactivated it and it remained, only there were now additional icons I didn't want in my taskbar (as illustrated above). This wasn't good enough, and it was still tedious to change the language.

Further examination of the 'Text Services and Input Languages' properties dialog showed a Key Settings button, which launched the 'Advanced Key Settings' dialog:

Windows Language Advanced Key Settings dialog

This revealed that the key combination Left Alt + Shift changed the keyboard language! I didn't know that!

Hang on, what are the chances of accidentally hitting that combination? Too high, I think. I use keyboard shortcuts as much as possible, so without any visible indication, I've had no way of knowing whenever I've accidentally changed the keyboard language! No wonder this behaviour mysteriously and suddenly appeared.

Come to think of it—now that I know more about the cause—I was taking screengrabs and copying the images for this topic, so perhaps I unwittingly hit the Left Alt + Shift key combination in the process. Most likely I did just that!

Well, that's not good. I notice that there's a button to 'Change Key Sequence'. Perhaps I could do that—change it to something I'm more unlikely to accidentally hit. Unfortunately, the possible combinations are severely restricted:

Windows Keyboard Language Advanced Key Sequence Change dialog


Back to Top

Curing the problem

The 'Text Services and Input Languages' properties dialog has an Advanced tab, which also looks promising:

Windows Keyboard Language Advanced dialog

After checking (enabling) the Turn off advanced text services box, the 'Language bar' disappeared. Hopefully, I now have Australian English set, and can't accidentally use the keyboard shortcut to change it to US English.

All that's left to do now is to clean up the text with language tags applied.


Back to Top

To change the language of the currently selected text:

In EW, select the text tagged with the wrong language, and in the menu:

Select Tools>Set Language:

Expression Tools Set Language dialog


See Also

Jump to separate topicThe Future Of FrontPage | Jump to separate topicExpression Web Designer | Jump to separate topicExpression Web Help | Jump to separate topicProblems with Expression Web
Jump across to site home page Lotech Solutions' Tips, Tricks, and Procedures

Back to Top

Who am I? > find out more