• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Saving i18n strings in hidden fields

 
Ranch Hand
Posts: 42
Postgres Database Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
God is a comedian playing for an audience that is afraid to laugh - Voltair. tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic