Introduction
The Portal 8.0 theme out-of-box uses localized templates for both the theme and skin. A localized template is a static HTML template that has translated text for the locale which is specified. These templates are required for proper globalization of the Portal. This means that the template being displayed in the browser is not the template located in the root folder for the theme or skin, but rather a localized version in the "nls" folder. For some businesses, displaying content in one locale is the only requirement. This article will explain how to remove the use of localized templates.
Template Locations
These locations will be referenced in the instructions on removing the localization for both the theme and skin templates.
Theme
Root template:
Name: theme.html
Location: /fs-type1/themes/<Theme Folder>
Localized templates:
Name: theme_<locale>.html
Location: /fs-type1/themes/<Theme Folder>/nls
Skin
Root template:
Name: skin.html
Location: /fs-type1/skins/<Skin Folder>
Localized templates:
Name: skin_<locale>.html
Location: /fs-type1/skins/<Skin Folder>/nls
Removing Localization from the Theme Template
1. Open the root theme.html template.
2. Locate the line "<!--START LOCALE LINKS-->" in the root template. Between the start line and the end line denoted by "<!--END LOCALE LINKS-->" are references to the 32 localized templates. Remove the 32 lines of localized references that are using this syntax:
<link rel="alternate" href="nls/theme_<locale>.html" hreflang="<locale>">
3. The root template is used to build the localized templates and to do that there are replacement variables setup to insert the translated text and bi-directional (bidi) language atrributes. These variables need to be removed or replaced. Here are the references in the out-of-box theme template:
HTML element
Out-of-box element:
<html xmlns=http://www.w3.org/1999/xhtml" lang="${locale}" xml:lang="${locale}" ${bidi.dir.attribute}>
If using a non-bidi language, this is the suggested change:
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
If using a bidi language, i.e. Arabic, this is the suggested change:
<html xmlns="http://www.w3.org/1999/xhtml" lang="ar" xml:lang="ar" dir="rtl">
Body element
The body element requires style classes to assist in properly displaying bidi text.
Out-of-box element:
<body class="lotusui30dojo tundra${rtl| lotus_rtl mumrtl} locale_${locale}">
If using a non-bidi language, this is the suggested change:
<body class="lotusui30dojo tundra locale_en">
If using a bidi language, i.e. Arabic, this is the suggested change:
<body class="lotusui30dojo tundra lotus_rtl mumrtl locale_ar">
Logo
The logo image in the theme requires alternative text.
Out-of-box element:
<span class="wpthemeAltText">${nls.Theme:theme_websphere_portal:xml}</span>
Suggested change:
<span class="wpthemeAltText">Logo</span>
After removing the references to the localized templates, and replacing the variables with static text, this root template will now be rendered by the theme.
Removing Localization from the Skin Template
1. Open the root skin.html template.
2. Locate the line "<!--START LOCALE LINKS-->" in the root template. Between the start line and the end line denoted by "<!--END LOCALE LINKS-->" are references to the 32 localized templates. Remove the 32 lines of localized references that are using this syntax:
<a rel="alternate" href="nls/skin_<locale>.html" hreflang="<locale>" class="wpthemeDisplayNone"></a>
3. The root template is used to build the localized templates and to do that there are replacement variables setup to insert the translated text and bi-directional (bidi) language atrributes. These variables need to be removed or replaced. Here is the reference in the out-of-box skin template:
Context Menu
The skin context menu is used to display the actions that can be performed, i.e. Maximize, Minimize.
Out-of-box element:
<span title="${nls.Theme:a11y_display_menu:xml}"><img aria-label="${nls.Theme:a11y_display_menu:xml}" alt="" src="/wps/themeModules/themes/html/dynamicSpots/icons/blank.gif"></span>
<span class="wpthemeAltText">${nls.Theme:theme_actions:xml}</span>
Suggested change:
<span title="Display Menu"><img aria-label="Display Menu" alt="" src="/wps/themeModules/themes/html/dynamicSpots/icons/blank.gif"></span>
<span class="wpthemeAltText">Actions</span>
After removing the references to the localized templates, and replacing the variables with static text, this root template will now be rendered by the skin.