• Post Reply Bookmark Topic Watch Topic
  • New Topic

Saving i18n strings in hidden fields

 
Alexandru Gifei
Ranch Hand
Posts: 42
Java Linux Postgres Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
We are working on a project where we have to load i18nstrings using fmt tags for instance, on the server-side. We do not have client side i18n strings, and we import these keys in jsps. The issue arises when we have to use these keys in combination with javascript. The only possible way that comes to my mind to separate js from jsp code is to use hidden input fields holding the i18n string values and reading the inputs withing javascript, but i am thinking of the html content that is getting bigger with all these hidden inputs. Is this a good practice or is there other way to achieve this (javascript code separation from jsp)? I know a solution would be to internationalize the strings in javascript code, but that is not possible at this moment.

Thank you,
Alex G.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!