Global Development and Computing Portal Global Development and Computing Portal

Ask Dr. International

Column #10

This installment of questions from Dr. International really does not have a theme. It is more or less a way for the Doctor to catch up on the miscellaneous questions that are asked. Issues covered are:

On This Page
Allowing language choices in applicationsAllowing language choices in applications
Hotkey / Keyboard accelerator translationHotkey / Keyboard accelerator translation
VBA (Visual Basic for Applications) and resource filesVBA (Visual Basic for Applications) and resource files
Fixing those garbage characters in web pagesFixing those garbage characters in web pages
Language support in the OSLanguage support in the OS
Column 9: Questions about Mirroring, Arabic Resources, Locales, Non-ASCII Computer NamesColumn 11: Registry Localization, Input Locales at Log In, Urdu Keyboard, Codepages, A Font's Script
*

Allowing language choices in applications

Dear Dr. International,

What is the best way to incorporate into our applications international support for users so they end up using the right language? Should we automatically try to detect the OS language setting and use that (if, so, how?), should we let the user set the language manually via a program option (hoping they know enough English to figure out how to do this or have someone who can help them), or should we hit upon some hybrid approach?

linguistically inclined

Dr. International replies:

Dear Inclined,

There is an excellent article on globaldev about this very issue: http://www.microsoft.com/globaldev/handson/dev/muiapp.mspx

As for the switching of the UI language, the doctor would suggest that applications should start with the current OS UI language. Have a function where the user can choose a language from a list of language names written in their native language, and then come up in the language of choice until the language is changed. (see below for example)

Language choice menu from Windows XP Regional and Language Options

Language choice menu from Windows XP Regional and Language Options

Top of pageTop of page

Hotkey / Keyboard accelerator translation

Dear Dr. International,

I wonder if you could clear up a discussion on which I've heard at least two different (and strongly argued) opinions...

When developing localized products with translated menu options and dialog labels, the "hotkey" letters for each interface component might be different.

Is there a standard approach to dealing with this? That is, should the same hotkeys be preserved from one locale to the other regardless of the language text, or should the hotkeys vary according to the translated text?

Wanting–to–know

Dr. International replies:

Dear Wanting,

There are indeed two different answers, depending on which languages you are talking about.

For all European and Middle–East languages a "native" hotkey is assigned. For example the &File menu is &Datei in German, &Arquivo in Brazilian, &Arkiv in Swedish, &Dosya in Turkish.

For East Asian languages the English hotkeys are kept and added to the translation. For example the &File menu is ファイル(&F) in Japanese. This was done because there are so many different input layouts for each of these languages and the only thing you are sure of is that the user will have some access to the ASCII key values of a–z.

The thing to remember is Hotkeys were designed to make the user's life easier. If you choose a key that may not be accessible or hard to get to, you are defeating its whole purpose for being there.

Top of pageTop of page

VBA (Visual Basic for Applications) and resource files

Dear Dr. International,

Can I use resource files with VBA? How?

I'm writing a global application in VBA. I want to have a single code. The resource files is a good idea, but how can I implement it in VBA?.

Globally Resourceful

Dr. International replies:

Dear Resourceful,

VBA can use resource files, but in an indirect way. You have to write an OLE Server DLL that will load resources for your VBA script. An implementation of this technique can be seen at MSDN. The article is not new, so the approach will work with even older releases of Office applications.

Top of pageTop of page

Fixing those garbage characters in web pages

Dear Dr. International,

Our problem is that Windows 2000 is supposed to support multi–language for display and input (not menus etc). We have installed the Korean language, and it works on very few Internet sites. Most sites have garbage showing up.

Are you able to tell us why this is? and how we can fix it?

the Garbage Collector

Dr. International replies:

Dear Collector,

Most likely the websites you are trying to display do not have a charset tag in the HTML page. To try this go to http://www.microsoft.com/korea/ms.htm . This page has the correct charset information (<META charset="ks_c_5601-1987">), so it should display correctly.

In the case of a page with no charset tag you will need to tell Internet Explorer, which encoding it has to use: right click on a "garbage" page, select Encoding, and then Korean.

Top of pageTop of page

Language support in the OS

Dear Dr. International,

We're a Software Development company located in Dubai, UAE. At the moment, we're working on Tigrinya, Amharic & Ethiopian languages for Windows platform. As far as I know these languages are not yet supported by Windows. I was wondering if Microsoft could help us in this regard, since we're currently in this project.

Any hints or contacts for further info. would be so appreciated.

Looking

Dr. International replies:

Dear Looking,

You are right, none of the languages your are interested in is currently supported by Windows OS. I won't be able to advise you on how to implement that functionality, but I can share with you what it really takes to support a new language. A language support requires all of the following:

Support for the script:
Ethiopian for example uses the Ethiopic script. Your application should know about the script specific rules such as:

Reading order of the text (right to left, left to right)

Contextual shaping (example of Arabic language where the position of the letter would define its shape within the sentence)

Combining characters (example of Lam–Alef in Arabic)

Justification (example of Kashida)

Font support:
you need to have a font that would contain glyphs of the target language.

Keyboard support:
depending on the language, you need to create a keyboard layout or an input method editor to map between keyboard inputs and the appropriate character.

NLS support:
You need to have a set of language specific rules/standards to represent formatted data such as date (calendars), time, currency symbol...

As you can see, it is a complex task to add support for new languages, unless these languages use a script already supported by the OS. Microsoft looks at all of these issues and more before it undertakes adding new languages to the operating system. Even though it is not an easy process, Microsoft still likes to hear from customers if they feel they have good supporting reasons for a language to be added.

Top of pageTop of page

See you next time!

Dr. International
Windows Division

Column 9: Questions about Mirroring, Arabic Resources, Locales, Non-ASCII Computer NamesColumn 11: Registry Localization, Input Locales at Log In, Urdu Keyboard, Codepages, A Font's Script
Top of pageTop of page