JavaScript Internationalization & placeholders


Some time ago I wrote about moving a Teamroom application up to IBM Bluemix. This month the XPages runtime is now general available.

In the post I mentioned I would come back on some design gotchas I saw while analyzing and preparing the Teamroom application for staging it to Bluemix. So here is (at least9 a first post.

What I noticed for example was the usage of the l18n library in SSJS and placeholders in properties files.

i18n formatting

This is a server script library with methods to format messages for localization, display dates in a locale-specific manner and miscellaneous Internationalization utilities.

So how does this works?

Create two or more strings properties file e.g.


The file content:

compliment=Handsome {0}

The file content:

compliment=Snygging {0}

Now create an XPage and place e.g. a Computed Field control on it and calculate it’s value:

<xp: text><xp: this.value><![CDATA[#{javascript:compliment = strings.getString(“compliment”);

return i18n.format(strings.getString(“”), compliment);}]]></xp: this.value></xp: text>

(Do not forget to enable Internationalization for your application in the Application Properties under section International Options)


Notice in the properties file the usage of a placeholder: {0} and how it is being referred: strings.getString(“”), compliment. Here the variable compliment (another string property value) is put in the placeholder.

As a result in the default language I get returned “Hello Handsome” and when I choose Swedish as default language in my browser I get returned “Hello Snygging”.

By wrapping it and formatting it with the L18n library you ensure it is fitted according the active language. This is very handy for dates, amounts etcetera.

Links of interest

More details about JavaScript Internationalization can be found in the IBM Notes Domino Application Development wiki.


Teamroom XL fix – Filter documents by subteam

Some may enjoy a longer vacation than others, most of us will land in the same nest again.

At the moment we are reviewing the Teamroom 8.5.3 XL template, to check if this is a more user-friendly mobile interface for document sharing solution than MS SP.

However I noticed a problem with Subteam filtering option in the ‘All documents’ view. The problem is that the xvwDocsByTeam view is not correct (the wrong field name is present in the view design)…

Here is the fix:

  1. Open xvwDocsByTeam view
  2. Change the “Team” column’s value to:

@If(form=”Status”; “Team Status”; SubteamInterest)

Now back to user-testing and acceptance =)

Using Teamroom 8.5.2 – recommended documentation?

I am currently looking at the 8.5.2 Teamroom template and if it will fit well in our application portfolio. Getting the application up and running is not a problem. Allthough I have noticed some technical problem areas the information I am more interested in is about:

  • The purpose of the application. What is it’s objective and how we should position the application in our portfolio.
  • How should the application be setup and what are the options?
  • How can daily users use the application, what is in it, what are the options to use it?

A lot of information on Teamroom is available on the web, but not all is of recent date or distributed by IBM. For example:

Unfortunately such information is not shipped with the template. In case you know where I can find good, more recent information please drop a reference here.