How to share the same properties file for Java and jQuery i18n -
i try use properties file manage string text.
for , java's property file located @ src/org/xxx/lang/bundle
, , jquery.i18's located @ webcontent/i18n
.
is there way share same property file ?
it possible share same properties file. 1 way suggested in comment copy file over; done build script. frankly seem easiest solution.
other ways share file:
- a servlet or web service return required content on http request (i.e. dynamically generate required language file) - requires coding,
- you can use same method using translate html templates (whatever technology you're using, jsp, thymeleaf?) either generate array used jquery or create pre-translated html pieces (i.e. handlebars templates).
the choice depends on technology stack requirements (i.e. response time); faster if have pre-translated html parts can reuse, generating html strings brings overhead.
Comments
Post a Comment