• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

L18N question

 
Michael J. Makunas
Ranch Hand
Posts: 37
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The site I am working on is going multi-lingual so we're dealing with some L18N issues. Basically, we've put all the text in properties files and are using <fmt:message key="foo"/> to get the correct text. The problem is adding hyperlinks to the text. Depending on the language, the link may be in different parts of the sentance. We don't want to put mark up tags in the properties files. We could could do <fmt:message key="prelinkfoo"/><fmt:message key="foo"/><fmt:message key="postlinkfoo"/> but that too is a bit messy and will be a problem if the sentence has more than one link in it.

Any ideas?
 
Bart Allen
Greenhorn
Posts: 21
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are there certain words or word combinations that will always result in a hyperlink? If so, you could create a secondary file of these values and then write a generator that produced an xml file out of you base text property file and your app would look at the gen'd xml file instead of the properties file. Modifications to the base text files would require re-running of the generator.
 
Michael J. Makunas
Ranch Hand
Posts: 37
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bart Allen:
Are there certain words or word combinations that will always result in a hyperlink? If so, you could create a secondary file of these values and then write a generator that produced an xml file out of you base text property file and your app would look at the gen'd xml file instead of the properties file. Modifications to the base text files would require re-running of the generator.


Yeah, that is a possibility. But probably overkill for our situation. We don't have any sentences with more than one link now so the prefoo/foo/postfoo approach is probably best. We're not talking about a site with thousands of pages of text and links so a not so elegant solution will have to do for now. But this must be a fairly common problem.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic