Contents Index Topic Contents | ||
Previous Topic: How to Automatically Update an ActiveX Control Next Topic: Open Software Description Reference |
Setting Language Dependency Using OSD
- Deliver localized language versions of applications/controls to the appropriate language systems automatically through code download.
- Allow users to download and preview English versions of applications/controls, and provide an automatic notification/download of users' language version when it becomes available (replacing their English version should they choose to do so).
- Make it easy for developers to author and for PMs to manage.
- Ensure that the mechanism does not break download on Microsoft® Internet Explorer 3.0.
The model is based on a data file (an OSD file) housed in a signed cabinet (CAB) file (for security) that specifies which languages and platforms the application supports and at which location.
This OSD is alone in a main CAB placed in the GUID directory for the control/application on the object store or at some code base URL location. The OSD tells Internet Component Download which languages are available under the DEPENDENCY element by specifying sections for those languages.
If the specific language CAB is empty or not found and English is supported, code download proceeds to download the English version of the control/application. The next time this object is referenced, Internet Component Download checks the LanguageCheckPeriod default value (expressed in days and implemented by the control/application itself in the OSD). Internet Component Download compares the downloaded date plus elapsed days with the current date to decide whether to download the main CAB again to check for language updates. If the language has become available, Internet Component Download shows a certificate to the user and downloads the localized control (not really informing the user what it's up to).
Applications should make sure they place all the language values they intend to support in the DllRegisterServer routine or in an INF file in the main CAB's OSD from the very beginning. This ensures an appropriate placeholder is put in the registry for future upgrading when the language version matching the browser becomes available. Internet Component Download (code download) looks up the language of the browser by checking the version information of Shdocvw32.dll and compares it to the semicolon-delimited IS01739 name language section. If a match is found, CDL downloads the CAB.
If the specific language CAB is empty or not found and English is not supported (only German, for example), the download will proceed by following the same path as an unmet dependency would in Internet Component Download (an empty box is displayed in the HTML).
Notes:
- Avoiding repeated certificates.
A variance between languages is allowed in the amount of time until the version becomes available through the LanguageCheckPeriod key with DWORD values.
[LanguageCheckPeriod] EN 1 FR 5 ES 30 JA 60 DE 30 KO 90 ZH-CN 120 ZH-TW 120The number inside the language would specify how much time to allow before checking again for that particular language. This is easy to implement, provides flexibility, and minimizes the certificate downloads for the user.
- Default language.
The language version is housed in an object referenced by the default IMPLEMENTATION element.
- Applications/controls must implement the check period values in the OSD file.
It's up to the application to implement the LanguageCheckPeriod key under its CLSID. This should be done in the DllRegisterServer routine or in an INF placed in the main data CAB. In the absence of this, given a mismatch, Internet Component Download defaults to 30 days.
Wins:
- No confusing user interface for the user to have to respond to.
- The appropriate language version of the control/application is delivered automatically, based on the user's browser language.
- Easy to administer for the PM through a single OSD in a single CAB.
- Download hits on the server and time on the net for users is minimized, while letting them preview the application/control in English until their language version becomes available.
- Method falls within the OSD model using XML, which is maintainable over time.
- Application/control developers do not have to use satellite localization with complicated dependencies. They have separate CABs for each language.
Constructing CABs for Multiple Languages
To support multiple languages, two types of CAB files need to be present:
Main data CAB
The main data CAB consists of three text files:
- INF file to allow installation on Internet Explorer 30
- INF file to set a language check period
- Main OSD file
The main OSD file contains the different language implementation information, as well as the locations of the individual language CABs.
You will need to edit these files as languages become available by adding IMPLEMENTATION sections.
The following is an example of the main OSD file.
<?XML version="1.0"?> <!DOCTYPE SOFTPKG SYSTEM "http://www.microsoft.com/standards/osd/osd.dtd"> <?XML::namespace href="http://www.microsoft.com/standards/osd/msicd.dtd" as="msicd"?> <SOFTPKG NAME="{039397C0-46DF-11D0-99CB-00C04FD64497}" VERSION="4,3,0,2077" > <Title>MS Chat</Title> <MSICD::NativeCode> <Code NAME="MsChatPr.ocx" CLASSID="clsid:039397C0-46DF-11D0-99CB-00C04FD64497" VERSION="4,3,0,2077"> <IMPLEMENTATION> <LANGUAGE VALUE="ja" /> <Processor VALUE="x86" /> <Codebase HREF="JaChatPr.cab" /> </IMPLEMENTATION> <IMPLEMENTATION> <LANGUAGE VALUE="de" /> <Processor VALUE="x86" /> <Codebase HREF="DeChatPr.cab" /> </IMPLEMENTATION> <IMPLEMENTATION> <Processor VALUE="x86" /> <Codebase HREF="EnChatPr.cab" /> </IMPLEMENTATION> </Code> <Code NAME="RegEntry"> <IMPLEMENTATION> <Codebase FILENAME="langchk.inf" /> </IMPLEMENTATION> </Code> </MSICD::NativeCode> </SOFTPKG>The following is a sample INF file to set the language check period.
; Copyright (c) 1996 Microsoft Corporation [Version] Signature="$Chicago$" AdvancedINF=2.5 [DefaultInstall] AddReg=IEIntl.Add.Reg [DefaultInstall.NT] AddReg=IEIntl.Add.Reg [IEIntl.Add.Reg] HKCR,%MSCHATCHECK%,"DE",3,"5" HKCR,%MSCHATCHECK%,"JA",3,"5" HKCR,%MSCHATCHECK%,"FR",3,"15" HKCR,%MSCHATCHECK%,"KO",3,"15" HKCR,%MSCHATCHECK%,"TW",3,"15" HKCR,%MSCHATCHECK%,"",,"Enabled" [Strings] MSCHATCHECK = "CLSID\{039397C0-46DF-11D0-99CB-00C04FD64497}\LanguageCheckPeriod"Individual language CABs
The individual language CABs contain the following files:
- Specific language version of object
- Object OSD file
The object OSD file would contain the information on how to install this language version, including any code dependencies and so on.
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.