Servigistics InService Publishing and Loading > Additional Information > TAL Customization > Adding Localized Strings for Labels in IE XML
  
Adding Localized Strings for Labels in IE XML
IE XML styling contains localized strings (such as WARNING, CAUTION, and so forth) for the default supported languages. These strings are inserted by the IE XML view stylesheet using the named template search that looks-up language-specific XLIFF files located in a subfolder of the IE XML stylesheet folder. The path to the subfolder is XLIFF/locale/language-code/ where language-code is the language code for one of the default-supported languages (such as en-US, fr, and so forth).
The lookup uses a convention where the localized string is associated to a unique ID that is the corresponding English string in lower-case and without any punctuation. For example, the string “How to Avoid:" gets assigned the ID howtoavoid.
For each language Servigistics InService checks the following two XLIFF files looking for the provided ID in this order:
CustomLocaleSpecificMappings.xlf
LocaleSpecificMappings.xlf
The template call returns the result of the first successful match in these two files in the current locale. If the string is not in these files, Servigistics InService tries to retrieve the en-US string value from that locale’s LocaleSpecificMappings.xlf file. If the string is not there, Servigistics InService lastly defaults to the fallback string str supplied in the named template call:

<xsl:template name="search">
<xsl:param name ="id"/>
<xsl:param name ="str"/>
Overriding or Extending the Set of Default Localized Strings
As mentioned previously, the search template lookup returns a custom definition for same ID, so it is used instead of the default definition. This enables you to extend the set of localized strings within the set of default languages through a custom XLIFF file and view stylesheet customization. This prioritization is done as the template search first consults the (optional) custom XLIFF file CustomLocaleSpecificMappings.xlf and secondly the default XLIFF file LocaleSpecificMappings.xlf.
Extending the Default CSS Definitions
The default view stylesheet includes a customization stylesheet customView.xsl:
<xsl:include href="customView.xsl"/>
This stylesheet has a customization hook to include additional CSS definitions:
<link rel="stylesheet" type="text/css"
href="../css/IEXMLcustomization.css" />
The XSLT and CSS customization hooks potentially make the IE XML styling completely independent of the default styling.
Extending the Set of Default XLIFF Files
For languages beyond the set of default ones, the IE XML loading script must be updated to create additional AddSources statements. To simplify this customization, the default stylesheet producing the script DefaultNewIEXMLScript.xsl (located at INSERVICE_HOME/InS_Data/Work/System/Work/Assets/Scripts) has a customization hook IEXMLcustomizations.xsl:
<xsl:include href="IEXMLcustomizations.xsl"/>
The customization stylesheet defines an XSLT variable custom-lang-array that should just include additional language codes that are not already included by default. To do this add one <lang> element per additional language. For example, to add Swahili you would add following <lang> element:
<xsl:variable name="custom-lang-array">
<lang>sw</lang>
</xsl:variable>
The DefaultNewIEXMLScript.xsl stylesheet will then produce the corresponding Load script sections for which to include the LocaleSpecificMappings.xlf file and, when it exists, the CustomLocaleSpecificMappings.xlf file in the additional language.