Resource Bundle

Resource Bundle used for display internationalize messages. it store information in properties file and loads these information from the properties file and display into view page.

1) Hippo CMS supports Java resource bundles management in the repository and integration with JSTL tag libraries.

2) store resource bundles in the repository and configure a default resource bundle per virtual host group, virtual host, mount or sitemap item, while supporting standard JSTL tag libraries

3) resource bundle document managed by editors

Syntax: <@fmt.message key=”message.key”/>

Steps to create Resource Bundle in Hippo CMS.

Step 1: create default language

Goto CMS –> add new resource bundle employee document.

add-new-resource

 

Step 2: Give the ID for resource bundle I given emp001

bundle-2

 

Step 3: Set the locale value ex: india english en_IN

 

Step 4: Add Key and values to resource bundle

bundle-2

Step 5: Document Save and close and publish.

 

Step 6: create ftl page I created homepage-main.ftl

 

<#include “../include/imports.ftl”>

<@hst.setBundle basename=”emp001″/>

<div>

<h1>First Name: <@fmt.message key=”firstnamevar=”title”/>${title}</h1>

</div>

Step 7: login into CMS console to create page

bundle-7

Step 8: changes in hst:pages

bundle-2

Step 9: create site map name I created “bundle”

bundle-2

Step 10: output:

bundle-2

Leave a Reply