I’ve just received a question from one of my blog readers about how the built-in Web browser in the Pocket PC / Windows Mobile operating system,
Pocket Internet Explorer (PIE) / Internet Explorer Mobile (IEM) can be configured to request pages in different language than US English if you use an English language Windows Mobile operating system.
As this question is a very interesting one and very few people have the necessary HTTP- and actual programming (let alone offering a proxy server for free that does the trick!)-level knowledge to answer this question, I’ve decided to write a complete article on it.
What's the point? When can this be useful?
There are a lot of Web sites that offer their content not only in English but also in several other languages. The most important example is Google or, for example, many blogging engines. For example,
b2evolution(the engine used in the
Smartphone & Pocket PC Magazine Expert Blogs) returns English pages by default. However, if you configure your local Web browser to request Web pages in another language, you'll receive Web content in that language.
For example, if you set your referred language to, say, Finnish,
you'll get this (Finnish language) page instead of
this (English original) when you try to log in. And, the list continues - there are a LOT of other pages, frameworks, content management systems that do take into account what language the client prefers and return their Web content accordingly.
Making use of this capability can be of enormous advantage for people that don’t really have a good command of English and would like to prefer content or, at least, menus and dialogs in their native tongue.
How can you instruct desktop Web browsers to request Web pages in the language of my choice?
With Internet Explorer, go to
Tools/Internet Options/ General and
click Languages in the Appearance group. Then,
just click the Add button and choose the language you prefer
from the list. Make sure you move it up the list (
with the Move Up button) so that it'll be your primary language.
As far as the desktop
Opera browser is concerned, I'll elaborate on it later.
The desktop
Mozilla/Firefox must be configured in exactly the same way as the Pocket PC version (
screenshot) - see below.
OK; now, how I configure my Pocket PC Web browsers to do the same?
It's, unfortunately, a bit more complicated. Read on!
A bit geeky stuff: HTTP and Accept-Language
(Note that understanding this section is
not needed if you aren't a tech / geek type of person. However, trying to digest it can be
very useful to understand my HTTP request header screenshots and to understand how, for example, my proxy servers work.)
First, to understand how the HTTP servers (that is, Web servers) are able to decide in which language they should return the requested Web page, it's very important to know that the HTTP protocol (the protocol used in communicating between a Web server and a browser) uses so-called '
HTTP request headers'. These requests tell the Web server what resource to get, whether it's cached on the client (so that the server only needs to return the resource again if it's been changed in the meantime), whether the client has 'cookies' stored about the server to maintain Web sessions and so on.
One of these headers is called '
Accept-Language' and tells the Web server what language the client prefers (with, optionally, an additional country code and/or quality setting when there is a list of preferred languages). For example, if you'd prefer pages in Finnish instead of the default English, this header looks like the following:
Accept-Language: fi (or,
Accept-Language: fi-FI - both are valid and can be used. The first, lowercase 'fi' stands for Finnish, the second, uppercase 'FI' stands for Finland. Note that, in general, the country code can also be lowercase; from now, on, I use lowercase letters to denote the country.)
If you'd prefer your preferred language to be Canadian French, you can use the following request header:
Accept-Language: fr-ca
And, as far as strictly US English is concerned, you'll often see this header:
Accept-Language: en-us
In order to be able to return a Web page tailored for your language preferences, the Web server MUST receive every HTTP request (Web page download) containing the
Accept-Language header. If it doesn't receive it, it will in no way know what is your preferred language and will, in almost all cases, return the default one (English in most cases).
Does the system-wide Regional Settings have any effect on the preferred language?
Unfortunately, modifying the regional setting in
Settings/System/Regional Settings doesn’t change the “
Accept-Language” HTTP header sent out to the Web server (it’s based on this HTTP request header that most HTTP servers – except for
Google, which uses a bit more sophisticated algorithm, which I’ll elaborate on later –, if they have content in more than one language, decide what language they should return their content in) – not even in the latest WM5 AKU2,
as can also be seen in this screenshot. I took the screenshot on a Dell Axim x51v with the latest, AKU2 A12 ROM, after setting the regional setting to Germany (and rebooting). It certainly shows IEM sends out requests telling the Web server that it prefers U.S. English pages, no matter what the operating system setting is.
PIE AcceptLanguage in the Registry
Fortunately, WM2003+ IEM/PIE does store the language code in the Registry, under
HKEY_CURRENT_USER\ Software\ Microsoft\ Internet Explorer\ International\ AcceptLanguage. How it is accessed under different operating systems, however, is varying.
First, under Pocket PC 2000 (the first Pocket PC operating system version), there is no
International key at all as can also be seen in
here. That is, it’s futile to create the above value in the Registry – it just won’t work.
Under Pocket PC 2002, this value does exist with the value “
en-us” for (American) English devices. It, however, does not take its value into account and doesn’t even send out any Accept-Language header as can also be seen
in this screenshot.
It’s only with WM2003+ operating systems (WM2003, WM2003SE and WM5) that PIE (under WM5, IEM) copies the value of this String value to the HTTP request. However, interestingly, on English devices, the value doesn’t exist (unlike on Pocket PC 2002 devices, where, much as it does exist, its value isn’t used in the communication with HTTP servers in any way) – this is why I, at first, didn’t realize it’s there and usable. (I've tested this on four different WM5 devices (x51v, hx4700, Wizard, Universal) and on the WM2003SE PL720. None of them had this value, unlike, again, my Pocket PC 2002 Compaq iPAQ 3660.)
(Note that there are two other parts of the registry having PIE/IEM-related information:
HKEY_LOCAL_MACHINE\ SOFTWARE\Microsoft\Windows\ CurrentVersion\ Internet Settings and
HKEY_LOCAL_MACHINE\ SOFTWARE\ Microsoft\ Internet Explorer. There, however, is no language-specific information in there.)
All in all, if you have a WM2003+ Pocket PC, you can just create a String value named “
AcceptLanguage” under the
HKEY_CURRENT_USER\ Software\ Microsoft\ Internet Explorer\ International key with the correct language code (with, when needed, also the country code if it’s necessary).
If you don’t want to create the value by hand, I’ve created a registry import file to do the job for you. It’s available
HERE. All you’ll need to do is importing it with a Regedit5-compatible registry editor like Resco Registry Editor (please also see
this roundup of registry editors for alternates / converting the file to
REGEDIT4 format to be able to import with
REGEDIT4-only registry editors like
Kilmist and
Tascal.) Don’t forget to change ‘
en-us’ to your language first (for example,
‘ru’, ‘fi’, ‘fr’ etc.) Also, you may want to use some kind of associated quality value as is defined in section
14.4 of
the official HTTP 1.1 header specification. (For example, to express "
I prefer Danish the most, but will accept (preferably) British English and, finally, other types of English", use the string “
da, en-gb;q=0.8, en;q=0.7”)
Do PIE/IEM plug-ins let for changing the language?
Unfortunately, PIE/IEM plug-ins like
PIEPlus,
MultiIE or
Spb Pocket Plus (click the links for the latest reviews!) don’t let the user directly supply this vaue – ypu’ll need to directly modify the Registry in order to configure this value.
What about NetFront and Opera?
As far as alternate browsers are concerned,
NetFront 3.3 always sends out the ‘en’ language code and
Opera 8.6 doesn’t send out any Accept-Language header at all (click the links to see the screenshots showing this!).
Note that, on the desktop,
Opera supports this and it
can even be freely redefined in the GUI. I’ve checked the desktop INI files to see whether it’s there that this information is stored (many desktop-based configuration options are also accepted and interpreted by the Pocket PC version of Opera Mobile). Unfortunately, that’s not the case.
NetFront
has a “Base language” setting in View/Advanced Setting. The setting (which can’t be fine-tuned; for example, North-European languages are only a group and not individual languages), however, has no effect on anything (it only tells the browser the default encoding it should use when trying to render the page brought back).
All in all,
- unfortunately, as of their current versions (8.6 of Opera and 3.3 for NetFront) neither of these browsers look up/use the value of HKEY_CURRENT_USER\ Software\ Microsoft\ Internet Explorer\ International\ AcceptLanguage.
- you can’t configure them either to do so
In a later section, I'll elaborate on how you can still add/modify an/the Accept-Language header when using these two apps.
What about Thunderhawk?
Thunderhawk also sends out the english-by-default header. Unfortunately, it can't be modified
in the Settings dialog, it doesn't take into account the PIE/IEM registry setting and, as Thunderhawk doesn't let you use proxy servers, you can't use external proxy servers either to modify this header. This means it's fully impossible to change the language preferences using Thunderhawk, as opposed to all the other browsers.
What about Minimo?
The (as of writing) latest (08-27-2006)
Minimo nighly build offers seamless Accept-Language definition capabilities.
While
it doesn't use the PIE/IEM registry value for overriding its setting, you can easily modify the header. To do this, enter the “
about:config” URL in the address bar. You’ll be taken into the preference list screen. There, just enter ‘
lang’ in the
Filter field and, then, you’ll be taken right away to the
intl.accept_languages property as can also be seen
in this screenshot. Double-click
intl.accept_languages and
edit the value as you find it OK and press Enter. Then, in the config list, “
default” will change to ‘
user’ and
the headers will indeed be correctly sent out.
Paragon Language Extender
Paragon Language Extender is a well-known language changer application (including HTTP request modifying capabilities) for all Pocket PC (and Handheld / Palm-size) operating systems prior to WM5 (there is no WM5 version and
never ever try to install the Language Extender on a WM5 device – I’ve tested it on the WM5
Dell Axim x51v; I had to hard reset).
Among other things, WM2003+ versions of the Paragon Language Extender also support dynamic language change as can be seen for example in here:
In this case, ‘
de’ denotes I’ve installed the German extender; the screenshot also shows it has its own German-language dictionary.
Interestingly, the Paragon Extender doesn’t create
HKEY_CURRENT_USER\ Software\ Microsoft\ Internet Explorer\ International\ AcceptLanguage. It does “sit on” the operating system and inserts its own
Accept-Language header into the outgoing PIE requests. (Note that if you do create
HKEY_CURRENT_USER\ Software\ Microsoft\ Internet Explorer\ International\ AcceptLanguage by hand,
it’ll override that of Paragon).
Note that there are two major versions of Paragon Lang. Extender: and
old, PPC2k/PPC2k2-compatible, 4.23 version still available for non-major languages (that is, not available for, say, German or French but available for, say, Finnish, Bulgarian or Arabic) and a
new, WM2003/WM2003SE version (the latter is build 4710 for for example Finnish). Unfortunately, the former does
NOT make the PPC2k2 PIE send out the correct header. That is, it’s not possible to make the Pocket PC 2002 PIE to send out the correct request with either using Paragon Lang. Extender or, as we’ve already seen, by directly overwriting
HKEY_CURRENT_USER\ Software\ Microsoft\ Internet Explorer\ International\ AcceptLanguage.
Finally, in WM2003(SE), the Paragon app is
not recommended over the “traditional” way of overwriting HKEY_CURRENT_USER\ Software\ Microsoft\ Internet Explorer\ International\ AcceptLanguage –
it's an overkill and I only recommend it for “plain” request language modification if you need its other capabilities too.
Note that if you don’t need your device to be fully translated, you won’t need to install the full version – the second,
Compact setup (
as can also be seen in here) will do just fine. The results after the setup will be as follows:
What can I do if I want to browse the Web with a Pocket PC 2002 PIE or with Opera Mobile / NetFront?
You have two choices.
if you have the capability of running a proxy server somewhere (even on your Pocket PC PDA with a suitable Java Virual Machine (please read this article and search my blog for the word 'Java' for more info) - after all, it's multiplatform); for example, on a 24/7 online desktop PC,
- with a client that can be configured to use an external HTTP proxy (in this regard, Thunderhawk is disqualified) and does send out the Accept-Language header (in this case, NetFront), you'll need to use an external proxy server to change the language code sent out to another one before sending the request further, to the target Web server. If you have a Java Virtual Machine (easily downloadable from here - select 'Java Runtime Environment (JRE) 5.0 Update X'), I’ve written an easily modifiable, open-source (source here) HTTP proxy server available here. You will only need to start it with the command
java HTTPProxyAcceptsLangHeaderRewrite portnumber languagecode
if you have a JRE (I’ve compiled the class with JDK 1.3, so, any JRE will do) installed on your PC (again, you can get it at the above-linked Sun page).
For example, the command
java HTTPProxyAcceptsLangHeaderRewrite 8080 cool-eh
will result in the following response from http://www.proxydetect.com/ (after you correctly set up your Pocket Internet Explorer / NetFront browser to use the proxy - please see for example this article on doing so):

This shows that indeed the (of course non-existing) ‘cool-eh’ language code was sent to the server.
- If you, on the other hand, have a proxy-configurable client that does not send out the Accept-Language header (the case with PPC2k2 PIE and Opera Mobile), you’ll need to explicitly add the header to the headers relayed to the HTTP server. To do so, you'll need this Java class file (source here). Its usage is exactly the same as with the previous bullet.
The results of using this header-adding proxy server can be seen for example here (showing Opera Mobile).
- Mail the webmaster of the given webpage to do a dynamic country lookup depending on the client’s IP (internet) address instead of the Accept-Language header. Say, if you have a Thai client IP address, you would receive a page with Thai content even if your Web client sent out an Accept-Language header of ‘en-us’ (or no language code at all). Many Web sites do so – for example, even Google. Google, if it doesn't receive an Accept-Language header or the header (if it does exist) is the standard one requesting English pages, then, just looks up the country of the client and returns the content accordingly, in the local language of the country. If the Accept-Language header exists and it's set to something other than English, it'll return the page in that local(ized) language. This is what Web server administrators should strive for.
What about devices with non-English ROM's? If I, say, dump / sell my English Pocket PC and get a German one, will I get German pages instead of English ones?
Note that I wasn’t able to reliably test how and what Accept-Language headers the Web browsers on a Pocket PC with a non-English ROM send out. I don’t think the built-in PIE would request English pages on a Pocket PC with a German language ROM, but I may be mistaken (after all, PIE / IEM isn't the most sophisticated Web browser). The same (I don't know how it behaves on devices with non-English ROM's) stands for NetFront, which does send out the language header. Finally, as far as Opera Mobile is concerned, I seriously doubt it’d send out the correct header on any (non-English) Pocket PC – after all, it doesn’t seem to be sending out
any kind of language header. (Incidentally, it has the ‘Accept-Language’ string once in
opera.dll but there doesn’t seem to be any parameter to it.)
Acknowledgements
My blog reader ‘Begemot’ from Russia to point out the never-anywhere (give for example searching for “AcceptLanguage” a try on major PPC boards like
PPCT, Brighthand, AximSite, XDA-Developers (and on Google) etc. Note that, on the latter, there will be some (false) hits because of the MMS handler app on WM PE devices) discussed (this is why I didn’t know of it before either – and, as the given AcceptLanguage value only exist under PPC2k2, I haven’t run into it in the Registry either)
HKEY_CURRENT_USER\ Software\ Microsoft\ Internet Explorer\ International\ AcceptLanguage. Without him, I wouldn’t have been able to write this tutorial in its present form. Thumbs up :)