Reputation: 404
I know this is very basic question, but we are tumbled on to it.
We have a simple button in HTML file
<button data-dojo-type="dijit/form/Button" id="reset" name="reset" title="This is Reset button">Reset</button>
We have implemented the internationalization using dojo i18n feature and have provided appropriate French translation of the title property of the button as Réinitialiser la recherche
.
The special characters in that message gets displayed correctly in French if I use that message to display the HTML label like Réinitialiser la recherche
. But when I use the same i18n message in html button's title property, it is getting displayed as it is in the properties file Réinitialiser la recherche
.
Has anyone faced this issue or know the trick to display special characters in Button's title property?
Thanks in advance.
Upvotes: 1
Views: 1059
Reputation: 404
The issue was resolved when we used R\u00E9initialiser la recherche
instead of Réinitialiser
Upvotes: 1
Reputation: 44135
If you want to display special characters in a title attribute, you can just enter the character itself (use é
not é
), you just need a character encoding. Add the following <meta>
tag to your <head>
:
<meta charset="utf-8" />
And then set your button's title
attribute like so:
title="Réinitialiser la recherche"
And it should work.
Upvotes: 0