0

Our requirement is to internationalize the already running site which is using ATG framework. We have implemented the same in our JSP, however, we have static error/informative messages in javascript. We need to translate the messages as well.

Please suggest how can we translate the messages. For JSP, we declared translations in a property file and reading from there.

zenith
  • 33
  • 8
  • I don't think there is a whole lot you can do wrong here. What approach were you thinking about? – Halcyon Mar 07 '16 at 12:21

1 Answers1

1

We have somewhat similar requirement for which we have used jstl. It might help you :

<%@taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> 
<%@ page import="java.util.ResourceBundle"%>

Then under <head> <fmt:setBundle basename="global-messages" /> Set bundle takes name of the property file. global-messages-en or global-messages-hi are the property files which will contain labels of respective languages. We have custom implementation for that.

<title><fmt:message key="parameter.page.title"/></title>
<h1> here key="parameter.page.title" will be replaced by corresponding value of that key</h1>
</head>
Suyash
  • 525
  • 1
  • 6
  • 10