Web Page Localization 
This function allows you to localize HTML content developed using SAP Manufacturing Integration and Intelligence (SAP MII) based on the user's language.
To use Web page localization, you must save your HTML content as an .irpt file. This file extension identifies the files as Web pages that need to be processed by the system before being returned as HTML to the browser at runtime. During this process, the system replaces the localization keys with their translations based on the user's language.
To use a localization key in your HTML content, insert a tag such as {##KeyName}. The brackets identify the key as an SAP MII keyword for processing; the two pound signs identify the key as a localization key.
If the user does not have a language assigned, the default language (English) translations are used. If there is no translation for a key in the user's language, the default language translation for that key is used.
If you are using productivity tools to generate content, you can view a list of available localization keys and insert them from the wizard.
Localization in IRPT page body
The servlet references the query and the .XSL file. “Language” is passed as the name of XParamName.1 and the value of {Language}, from the session variable, is passed as the value of XParamName.1. This value will be referenced in the .XSL file localization.
Syntax
<SERVLET NAME="Illuminator">
<PARAM NAME= "QueryTemplate" VALUE="NGSFR_Common/Warehouse Movements/Bin to Bin/Get_bin">
<PARAM NAME= "Stylesheet" VALUE="/XMII/CM/NGSFR_Common/Warehouse Movements/Bin to Bin/Transfer_Bin_to_Bin_2_Mobi.xsl">
<PARAM NAME= "Content-Type" VALUE="text/xml">
<PARAM NAME="XParamName.1" VALUE="Language">
<PARAM NAME="XParamValue.1" VALUE="{Language}"><PARAM NAME="Param.1" VALUE="{HU1}"></SERVLET>
The following line of code must be present at the top of the XSL file in order for localization to work.
Syntax
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:java="http://xml.apache.org/xslt/java" exclude-result-prefixes="java">
Include the following lines of code. The first line is what associates the value of Language, passed by the XParamValue.1 located in the IRPT servlet tag, to a XSL variable called $Language. The next three lines represent a variable called $LocalizationProject which stores the name of the
project. You can change the value in <xsl:value-of select> to match your project. The two variables $Language and $LocalizationProject will be referenced when performing localization later in the .XSL
file.
Syntax
<xsl:param name="Language" />
<xsl:variable name="LocalizationProject">
<xsl:value-of select="'NGSFR_Common'" />
</xsl:variable>
Later in the .XSL file, include this line of code wherever localized text is needed. This line contains a method call which returns localized text. The first parameter, $LocalizationProject, is the name of the project you are currently in. The second parameter, $Language, contains the language code of the logged in user. The third variable should contain the key of the text you are localizing for. This value must be changed for each different localization text.
Syntax
<xsl:value-of select="java:com.sap.xmii.Illuminator.localization.WebLocalizer.getLocalizedString($LocalizationProject, $Language, 'PrinterMaintenance')"/>
You can add a new localization key and associated translations from the SAP MII administration menu by choosing .
To include a title on an engineering Web page, you can create a key named EngTitle. To place a "Welcome Engineers" heading at the top of the page, use the following HTML:
<body> <h2>Welcome Engineers</h2>
To replace the hard-coded string with the localized string, use the following HTML:
<body> <h2>{##EngTitle}</h2>
When you call the page, the {##EngTitle} title is replaced with text in the language of the user that is currently logged on to the system.
You could also place a similar string within an applet parameter tag. You can add it outside of the <SCRIPT> and <STYLE> blocks. The system replaces it with a specific language string, or if the page is saved as an .irpt file, it uses the system default string.
The variables names, or keys, and language string replacement values are created through the Localization applet. If you are using productivity tools for generating content, you can list the string replacement variable names and insert them from the wizard.
To see a working example of IRPT and XSL code, refer to /XMII/CM/NGSFR_Common/Warehouse Movements/Bin to Bin/Transfer_Bin_to_Bin_2_Mobi.xsl and Transfer_Bin_to_Bin_2_Mobi.irpt.