Play i18n Messages: Playing with i18n messages of Play Framework on client-side


Playing with i18n messages of Play Framework on client-side

Knoldus

Playing JsMessages

The following blog and attached code represent an example to compute localized messages of Play Application on client side.

Basically, Play JsMessages library takes the i18n messages of our Play application, sends them to the client-side as a JSON object and defines a JavaScript function returning a message value from a given language and the message key and arguments.

alt tag

  • Used Play JsMessages library to access i18n messages from client-side
  • Embedded JS & CSS libraries with WebJars.
  • Integrating with a CSS framework (Twitter Bootstrap 3.1.1)
  • Bootswatch-Darkly with Twitter Bootstrap 3.1.1 to improve the look and feel of the application

Instructions :-


  • To run the Play Framework, you need JDK 6 or later
  • Install Typesafe Activator if you do not have it already. You can get it from here
  • Execute ./activator clean compile to build the product
  • Execute ./activator run to execute the product
  • playing-jsmessages should now be accessible…

View original post 15 more words

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s