(can I really make 5 blog posts in 5 days? Well, this one is kind of a cheat, since it was written by one of the webdetails' Pedro's, this time Pedro Teixeira)

This is a quick&simple how-to that demonstrates the usage of i18n in a CDE dashboard

1 Create a new CDE dashboard and apply the 2-column template

2 Make a new text component

  • name: text01
  • htmlObject: Panel_1
  • expression:

function f(){ return Dashboards.i18nSupport.prop('XmlStructure.ERROR_001_LOAD_FILE_NOT_FOUND_EXCEPTION'); }
3 Save dashboard with name i18nTest

4 open i18nTest CDE dash

  • with no specific properties file, message value was loaded from global messages.properties file (at /pentaho-solutions/system/pentaho-cdf-dd/lang )

5 create a messages_.properties (ex: messages_pt.properties, messages_de.properties, ...) and add the line:

XmlStructure.ERROR_001_LOAD_FILE_NOT_FOUND_EXCEPTION=This message is now coming from my localized messages.properties file

6 upload the newly created messages_.properties file to the same directory where you saved i18nTest dashboard

  • properties files are hidden by default; on the menu bar click "View > Show hidden files"

7 (refresh browser's cache) open i18nTest CDE dash

  • you should now see that the message has been updated and is now using the value at your local messages_.properties file