coderifous / jquery-localize

a jQuery plugin that makes it easy to internationalize your web site.
465 stars 142 forks source link

Using translation in title and alt attributes #82

Open magglomag opened 8 years ago

magglomag commented 8 years ago

Hey again,

is it possible to use translations in title and alt attributes?

Thanks!

magglomag commented 8 years ago

Ok, I found out how to localize the title:

<a href="#" title="test title">Test link</a>

"start": {
    "title": "test title in french"
}

But how do I combine that with the localization of the link text Test link? This doesn’t work:

"start": {
    "Test link in french",
    "title": "test title in french"
}
magglomag commented 8 years ago

Alright, nevermind – I found it out by myself: You need to write text as the key.

"start": {
    "text": "Test link in french",
    "title": "test title in french"
}
loginetsolutions commented 6 years ago

This works for me. Thanks. But, it's breaking the tooltip