MicroStrategy ONE

Adding Localized Text to a Page

In order for the text on MicroStrategy Web pages to be displayed in the appropriate language for the current locale, the text is stored in separate descriptor properties file for each language. The MicroStrategy Web application determines the current locale (using the application language selected in Preferences) and then retrieves text from the appropriate locale-specific descriptor properties file. These descriptor properties files can be modified to add new descriptive text or modify existing text. Separate changes must be made in the descriptor properties files for each language in which the change is to be reflected. The syntax for the descriptor properties files is <UniqueID>=Text, where <UniqueID> must be a unique identifier. The default format for MicroStrategy-provided values is mstrWeb.<n> , where <n> is a unique sequential number. You can use a format such as scenario1.<n> as suggested in the Working with MessageBundle and Localization Descriptor files section.

In this customization scenario, you modify the US English language descriptor properties file by adding new text that to be displayed in the footer of the Welcome page. The Welcome page, which displays the projects registered with MicroStrategy Intelligence Server, uses Projects_Footer.jsp/ascx for displaying the footer information. In this scenario, you modify the MessagesBundle_en_US.properties file used for English (US) locale. It is possible to follow the same instructions to make changes for a different locale, by modifying the language descriptor properties file for that locale. If you want the new text to be displayed for all other languages, you must modify the descriptor properties files for all languages.

Also, in this scenario, you modify the CSS file used on the Welcome page to render the localized text in a red color.

Before customization:

After customization:

This customization can be accomplished using either of the following methods:

Deploying the plug-in provided with MicroStrategy SDK

MicroStrategy SDK provides a plug-in (ZIP file) that can simply be extracted to thepluginsfolder to view the customization in MicroStrategy Web. The following steps guide you in locating the plug-in and deploying it. 

  1. Access the plug-in: JSP version or ASP .NET version

  2. Extract the plug-in to the plugins subfolder inside the MicroStrategy Web installation folder.   

  3. Launch MicroStrategy Web to view the customization.

Using the Web Customization Editor to create a plug-in

MicroStrategy SDK provides a Web Customization Editor that can be used to create a customization plug-in. The following steps guide you in creating the plug-in and deploying it. 

  1. Launch the Web Customization Editor

  2. Enable the Property Files setting from the Show Advanced Options in MicroStrategy Preferences

  3. Click on MicroStrategy Web Configuration inside the Application Settings view to expand the hierarchical tree. The expanded list comprises the different settings that can be modified to perform customizations. 

  4. Click on Property Files to expand the list of property files used in MicroStrategy Web. 

  5. Navigate to WEB-INF->classes->resources and double-click on MessagesBundle_en_US.properties to launch the Web Properties Editor. 

  6. Enter a new property-value pair in the text field at the bottom confirming to the syntax nameOfProperty=value. For example: scenario1.1=If you encounter any technical difficulties, please contact your System Administrator

  7. Click Add

  8. Save your changes. 

  9. Navigate upwards in the hierarchical tree and click on Pages to expand the list of pages used in MicroStrategy Web. 

  10. Double-click the welcome (WELCOME) page. 

  11. Click the Template Properties tab at the bottom in the right frame to make changes to the Default page template. 

  12. Right-click the footer page section and select Edit current file

  13. Click the Yes button in the prompt to edit Projects_Footer.ascx/jsp

  14. Add the following code before <%--Copyright &#169; 1996-2009 MicroStrategy, Incorporated.--%>:
    ASP .NET code
    ::

    <span class="customAdminText"><web:descriptor runat="server" key="scenario1.1"/></span><br/><br/>:

    JSP code::

    <span class="customAdminText"><web:descriptor key="scenario1.1"/></span><br/><br/> 

  15. Save your changes. 

  16. Double-click on CSS (under the welcome (WELCOME) page) to expand the child nodes under it. 

  17. Right-click on welcomePage.css under Customizations and select New Selector

  18. In the New CSS Element dialog, enter .customAdminText in the Selector text field. 

  19. Click OK

  20. Right-click on .customAdminText and select New Property

  21. In the Update CSS Property dialog, enter color in the Property text field and #CC0000 in the Value text field. 

  22. Click OK

  23. Launch MicroStrategy Web to view the customization.

See Also