Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use single quotes in i18n in Playframework2?

While working on a French app (french language is full of single quotes), I needed to use i18n with single quotes and many other accentuated chars.

So here is an extract of my messages.fr-FR file :

some.key=C'est la vie!

And here is the output :

Cest la vie!

How can I use strings containing single quotes in my messages? Already tried those :

some.key=C\'est la vie! --> C\est la vie!
some.key="C'est la vie!" --> "Cest la vie!"

EDIT : Thanks to the link KDavid gave I was able to find the solution. You have to double single-quote.

C''est la vie! --> C'est la vie!
like image 552
i.am.michiel Avatar asked Aug 22 '12 09:08

i.am.michiel


1 Answers

prefix the single quote with... single quote (so just use two single quotes):

some.key=C''est la vie!
like image 186
biesior Avatar answered Sep 20 '22 06:09

biesior