Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

MessageFormat behavior

 
Adrien Ruffie
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello I use the following MessageFormat.format() method like:

msgParams array --> [<a href="/appcontext/fonction.jsp?id=000000000001b7d9">fonction</a>]



But the return is --> Le lancement de la fonction <a href="/appcontext/fonction.jsp?id=000000000001b7d9">fonction</a> na pas pu se produire, suite à lerreur suivante:

I would like to have "Le lancement de la fonction <a href="/appcontext/fonction.jsp?id=000000000001b7d9">fonction</a> n'a pas pu se produire, suite à l'erreur suivante:"

How I can do that ? I have look format() function parameters but not very well solution ...
 
Campbell Ritchie
Sheriff
Pie
Posts: 49411
62
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there anything peculiar about the ' character? Is it a metacharacter? Does it need to be escaped \' ?
 
Rob Spoor
Sheriff
Pie
Posts: 20550
57
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have fallen for that same issue recently myself. My template code included "hasn't". Everything after was treated as-is, including the {0} I put after it. And I was asking myself why the {0} remained in the final text...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic