Skip to main content link. Accesskey S
  • Log In
  • Help
  • IBM Logo
  • WebSphere Portal Family wiki
  • All Wikis
  • All Forums
  • Home
  • Product Documentation
  • Community Articles
  • Learning Center
  • IBM Redbooks
Community Articles Product Documentation Learning Center IBM Redbooks This category IBM Redbooks: Building a Sample Website Using IBM Web Content Manager 7.0 IBM Redbooks: Building and Implementing a Social Portal IBM Redbooks: Developing Exceptional Multi-Channel Web Experiences V7: IBM Web Content Manager Product Documentation V7: IBM WebSphere Portal Enable for z/OS Product Documentation V7: IBM WebSphere Portal Express Product Documentation V7: WebSphere Portal Product Documentation V8: IBM Web Content Manager Product Documentation V8: IBM WebSphere Portal Express Product Documentation V8: IBM WebSphere Portal Product Documentation (includes z/OS) Custom Search Scope...
Search
Community Articles > WebSphere Portal > Developing > Developing Themes for WebSphere Portal > Developing Themes for WebSphere Portal 8.0 > Removing template localization for the theme and skin with 8.0
  • New Article
  • Share Show Menu▼
  • Subscribe Show Menu▼

About the Original Author

IBM contributorScott Consolatti
Contribution Summary:
  • Articles authored: 16
  • Articles edited: 0
  • Comments Posted: 3

Recent articles by this author

IBM Dojo Toolkit for Portal 8.0 Update (8.0.0.1)

Provides a list of links related to IBM Dojo Toolkit within the wiki and external resources.

Theme Customization 8.0 Update (8.0.0.1) Quick Reference

Provides a list of links related to Theme Customization within the wiki.

Theme Optimization 8.0 Update (8.0.0.1) Quick Reference

Provides a list of links related to Theme Optimization within the wiki.

Theme Customization 8.0 Quick Reference

Provides a list of links related to Theme Customization within the wiki.

Theme Optimization 8.0 Quick Reference

Provides a list of links related to Theme Optimization within the wiki.

Community articleRemoving template localization for the theme and skin with 8.0

Added by IBM contributor Scott Consolatti | Edited by IBM contributor Scott Consolatti on May 9, 2012 | Version 2
  • Edit
  • More Actions Show Menu▼
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars
expanded Abstract
collapsed Abstract
Removing template localization for the theme and skin
Tags:

 

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.

 


  • Edit
  • More Actions Show Menu▼


expanded Attachments (0)
collapsed Attachments (0)
Edit the article to add or modify attachments.
expanded Versions (2)
collapsed Versions (2)
Version Comparison     
VersionDateChanged by              Summary of changes
This version (2)May 9, 2012 1:43:25 PMScott Consolatti  IBM contributorFix hyperlink/formatting issue
1May 9, 2012 1:37:55 PMScott Consolatti  IBM contributorCreate initial article
expanded Comments (0)
collapsed Comments (0)
Copy and paste this wiki markup to link to this article from another article in this wiki.
Go ElsewhereStay ConnectedHelpAbout
  • IBM Collaboration Solutions wikis
  • IBM developerWorks
  • IBM Software support
  • Twitter LinkIBMSocialBizUX on Twitter
  • FacebookIBMSocialBizUX on Facebook
  • ForumsLotus product forums
  • BlogsIBM Social Business UX blog
  • Community LinkIBM Collaboration Solutions
  • Wiki Help
  • Forgot user name/password
  • Wiki design feedback
  • Content feedback
  • About the wiki
  • About IBM
  • Privacy
  • Accessibility
  • IBM Terms of use
  • Wiki terms of use