Hi All, Our application requirement is that we have to display the error messages either in English or in German language depending upon the language selected by the user. In our application error is displayed using an Alert mechanism. We are performing some basic validations at the front end and rest of the validations are performed in the middle layer. All the errors that are trapped in the middle layer are propogated back to the Servlet and finally to JSP so that error can be displayed to the user. To handle various attributes of an error we have defined an error object. To avoid duplicate error messages we are using error codes to display the error messages. Our strategy to display error messages in English or German language is as follows: 1. We have defined the error codes are java script variables in two java script files Error_en_us.js and Error_de_ch.js. 2. Based on the language selection we are loading one of this file for a given session. 3. Depending upon the error code we are retrieving the error message from one of these files.
I am not very sure whether this is the best strategy to handle multi lingual error messages. Any comments on my strategy would be highly appreciated.