This step-by-step article describes how to hard code the language of the Microsoft Outlook Web Access (OWA) interface.back to the top
Hard Coding the Language of the Interface
When you access a mailbox through OWA, the language of the OWA interface (such as the forms and tooltips) is determined by a special HTTP header that is sent to the server by the client browser. The client browser indicates to the server in which language to display the user interface and the server will return the user interface in that language if the server supports that language. In Microsoft Internet Explorer, the user can change this option by clicking Internet Options
on the Tools
menu, and then clicking Language
on the General
The language of the default set of folder is determined by the language of the first client to access the mailbox. When a new mailbox is created, if you use the German version of Outlook, or Internet Explorer with a German Accept-Language to access the mailbox, the names of the Inbox, Calendar, Contacts and other default folders are localized into German. Therefore, if a German Accept-Language is used to view a mailbox that was initialized in English, the links to the folders on the shortcut bar will be in English.
You can hard code the language of the OWA interface by using an Internet Services API filter (ISAPI), which is an extension to Internet Information Services (IIS). This filter receives requests before Exchange does and sets the Accept-Language header to the language that you specify so that the client setting is ignored.back to the top
How to Write the Filter
To write such a filter, use the ISAPI Extension Wizard in Microsoft Visual C++ 6.0:
- Start Visual C++, and click New on the File menu.
- Click ISAPI Extension Wizard, give the project a name, such as AcceptLanguage, and click OK.
- Click to select Generate a Filter object, click to clear Generate a Server Extension object, and then click Next.
- Click to select Post-preprocessing of the request headers, click Finish, and then click OK.
- In step 4, a new workspace is created in Visual C. This workspace has one main file that is named CacceptLanguageFilter(). Double-click this file in the workspace.
- Scroll down to the DWORD CAcceptLanguageFilter::OnPreprocHeaders function.
- In this function, above the RETURN value, insert the following text:
NOTE: The following example hard codes the Accept-Language to en-us, which is the value for American English. Change this value to the language that you want to hard code into the interface. To find out what the value is for the desired language, you can see the list in Internet Explorer's language selector dialog box.
char* sz; sz = "en-us"; pHeaderInfo->SetHeader(pCtxt->m_pFC, "Accept-Language:", sz);
- On the Build menu, click Set Active Configuration.
- Click AcceptLanguage - Win32 Release, and then click OK.
- On the Build menu, click Build AcceptLanguage.dll, or press F7 to build a dynamic link library (DLL). This DLL is usually placed in the C:\Program Files\Microsoft Visual Studio\MyProjects\AcceptLanguage folder or something similar. Copy this DLL to the Exchange server.
- On the IIS server, start Internet Services Manager.
- Right-click the virtual server for which you want to hard code the language, and then click Properties.
- On the ISAPI Filters tab, click Add, and then browse to the DLL that you created in step 8.
Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs.
If you have limited programming experience, you may want to contact a Microsoft Certified Partner or Microsoft Advisory Services. For more information, visit these Microsoft Web sites:
Microsoft Certified Partners - https://partner.microsoft.com/global/30000104
Microsoft Advisory Services - http://support.microsoft.com/gp/advisoryservice
For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site:http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMSback to the top
You can also extend this template to perform other modifications, such as allowing the user to choose the user interface language dynamically from a separate Web page.back to the top
back to the top
- After you complete the steps, connect to that virtual server with a Web browser and the language of the OWA user interface should always be the one that you specified.
- You need to install this filter on every Exchange 2000 virtual server to which clients will be connecting directly. If you are running the servers in a front-end/back-end configuration and clients will never connect to the back-ends directly, you only need to install the filter on the front-ends.
For information about how ISAPI filters work, refer to the following MSDN Web site on ISAPI Extensions:back to the top