But this word-to-word strategy is not applicable to I18N because some languages have different sequence of words.
What's the best solution?
I don't want to have multiple JSPs for each language.
posted 3 years ago
As far as I am aware, it is not possible to produce JSP markup and have it interpreted in this manner - ie your <k:span> tags.
Those tags need to be in there at the time of jsp translation/compilation. They won't be evaluated if you output them via your JSP Writer.
So if I understand your purpose here, you want to apply markup tags to i18ned text.
Not a trivial thing.
The only approach that that even sounds remotely feasible is for you to write your own message tag, that would retrieve the translation from your message bundle, apply some custom logic to evaluate/expand that retrieved message, and then output it to the JSP.
No, its not standard at all, but it might be the only solution.