Microsoft KB Archive/310599

= How to hard code the language of OWA interface =

Article ID: 310599

Article Last Modified on 2/22/2007

-

APPLIES TO


 * Microsoft Exchange 2000 Server Standard Edition
 * Microsoft Exchange Server 2003 Standard Edition

-



This article was previously published under Q310599



IN THIS TASK
 SUMMARY

Hard Coding the Language of the Interface

How to Write the FilterAdditional Uses

Troubleshooting

 REFERENCES



SUMMARY
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 tab.

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.</li> 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.</li> Scroll down to the DWORD CAcceptLanguageFilter::OnPreprocHeaders function.</li>  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. <pre class="fixed_text">  char* sz; sz = &quot;en-us&quot;; pHeaderInfo->SetHeader(pCtxt->m_pFC, &quot;Accept-Language:&quot;, sz); </li> On the Build menu, click Set Active Configuration.</li> Click AcceptLanguage - Win32 Release, and then click OK.</li> 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.</li> On the IIS server, start Internet Services Manager.</li> Right-click the virtual server for which you want to hard code the language, and then click Properties.</li> On the ISAPI Filters tab, click Add, and then browse to the DLL that you created in step 8.</li></ol>

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 the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Partners, please visit the following Microsoft Web site:

https://partner.microsoft.com/global/30000104

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;CNTACTMS

back to the top

Additional Uses
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

Troubleshooting

 * 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.

back to the top