Book Image

Learning Alfresco Web Scripts

By : Ramesh Chauhan
Book Image

Learning Alfresco Web Scripts

By: Ramesh Chauhan

Overview of this book

Table of Contents (18 chapters)
Learning Alfresco Web Scripts
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

I18N for a web script – it's optional


Internationalization is a cool feature that can be very useful while creating web scripts.

There may be times when you are required to develop a web script that will directly be used by the end users, and hence, you need a human-readable web script response in the user's language. No worries, it is possible to provide I18N support to the web scripts in Alfresco, and hence, you can have the text in the response rendered in the preferred supported user languages.

We will also extend our hello world web script to have internationalization support and will get understanding of how to make a web script render a response using internationalization.

There are two things to be done in order to achieve this:

  • Creating a resource bundle for different languages

  • Modifying the response template to use the labels from the resource bundle

Adding a resource bundle for the hello world web script

In order to add a resource bundle for a web script, the first thing we need to do...