datadoit
|
Posted: 02/22/2011, 11:36 AM |
|
When working with translations, normally an apostrophe will work for
server-side translations. However, if you're going to use an apostrophe
in a translation that will be used via javascript (such as a
confirmation message for a button), you MUST escape the apostrophe in
your translation. If you do not, then all javascript on the page will
cease to function.
Example:
Are you sure you want to delete this record's content?
must be escaped via:
Are you sure you want to delete this record\'s content?
This can be easily overlooked when working in your project and using the
same translation for both a server-side event and a client-side event.
|
|
|
|
|