EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB484537: Add Norwegian locale with a specific data number format to Library Web


Ellen Jin

Product Owner, Senior • MicroStrategy


This article explains to add the Norwegian locale to Library Web.

Starting with the release of Strategy ONE (March 2024), dossiers are also known as dashboards.

Description


In Strategy 2020, Library Web does not support Norwegian and therefore, it does not have the desired date and number format for Norwegian. The expected format should be: 
 

  • Date: dd.mm.yyyy
  • Number: blank space for thousands separator and comma (,) for decimal

Solution 


To solve this problem, in Strategy 2021, we made some enhancements which allows you to add the plugin and the string translation files to the appropriate folders inside the Library Web deployment to add Norwegian locale in Library Web. 
The plugin contains the following files:

  • Strategy.xml
  • locales.xml
  • fomat_config.xml


The following string translation files need to be prepared:

  • MessagesBundle_nb.properties
  • nb_NO.js

The

Strategy.xml
file in the plugin is used to specify Library Web settings. The following are sample scripts for Norwegian:

 <parameter name="localesFile" value="/plugins/AddingNorwegianLanguage/WEB-INF/xml/locales.xml" />


<parameter name="serverFormatterFile" value="/plugins/AddingNorwegianLanguage/WEB-INF/xml/format_config.xml" />

Note: The
Strategy.xml
file registers the files in the plugin so that the Library Server loads the files in the given location. "
AddingNorwegianLanguage
" in the script is the plugin name. 
In the
locales.xml
 file, each
<locale />
tag represents the supported locale in Library Web. The following is a sample script for Norwegian: 

<locale locale-id="1044" language="nb" country="NO" desc="Norwegian (DNB)" desc-id="" char-set="UTF-8" char-set-excel="UnicodeLittle" codepage="65001" codepage-excel="1252" />  

The
format_config.xml
 file in the plugin is used to define the date number format. The following is a sample script for Norwegian:

<locale language="nb" country="NO">
		<list-separator>;</list-separator>
		<data-type name="integer">
			<out>###0</out>
			<in># ##0</in>
			<in>### ### ##0</in>
                        <!-- display node for this data type currently not in use -->
			<display>###0</display>
		</data-type>
		<data-type name="number">
			<out>###0,##########</out>
			<in># ##0,###</in>
                        <!-- display node for this data type currently not in use -->
			<display>###0,##########</display>
		</data-type>
		<data-type name="date">
			<out>dd.MM.yyyy</out>
			<in>d.M.yy</in>
			<in>d.M.yyyy</in>
			<in>yyyy-M-d</in>
			<display>dd.MM.yy</display>
		</data-type>
		<data-type name="time">
			<out>HH:mm:ss</out>
			<in>H:m</in>
			<in>H:m:s</in>
			<in>H:m:s z</in>
                        <display>HH:mm:ss</display>
		</data-type>
	</locale>

The
MessagesBundle_nb.properties
and
nb_NO.js
files are used for the text string translations. Each language has its own
MessagesBundles
and
.js 
files identified by a unique suffix.
The English
messagesbundle
file is located in the 
<LibraryWeb_Deployment>/WEB-INF/classes/resource
folder. You need to translate it to Norwegian and save it as
MessagesBundle_nb.properties
. 

ka0PW0000001JjgYAE_0EM4W000004aA5u.jpeg


The English

.js
file is loacted in the
<LibraryWeb_Deployment>/DossierReact/dist/messages
folder. This also needs to be translated to Norwegian and saves as
nb_NO.js
. 

ka0PW0000001JjgYAE_0EM4W000004aA64.jpeg

To add the Norwegian locale to Library Web, perform the following steps: 

  • Stop the Library Web Server. 
  • Navigate to the Library Web plugins folder (
    <LibraryWeb_deployment>\plugins
    ) and add the plugin folder, '
    AddingNorwegianLanguage
    ,' with the three files:
    • Strategy.xml
    • locales.xml
    • format_config.xml
ka0PW0000001JjgYAE_0EM4W000001IWO2.jpeg
  • Add
    MessagesBundle_tr.properties
    to the 
    <LibraryWeb_Deployment>WEB-INF/classes/resources
    folder.
  • Add
    nb_NO.js
    to the
    <LibraryWeb_Deployment>DossierReact>
    dist>messages
    folder.
  • Start the Library Web Server.
  • Change the browser language to Norwegian.
  • Launch Library Web to view the changes.
    The date displays as dd.MM.yyyy, and a blank space for thousands separator and comma for decimal. The interface string is also changed based on your prepared string files.

 


Comment

0 comments

Details

Knowledge Article

Published:

August 28, 2020

Last Updated:

March 21, 2024