whole Magento website was in Lithuanian, however, decided to add English and make it multilangual. Everything went find, and basically everything is in it's place, execpt not sure how to translate Ajax messages.
http://s2.postimg.org/a323wd4fd/Untitled.png
Code looks like:
new Ajax.Request(url, {
onCreate : function() {
_this.g.warn("Vykdoma", {
life: 5
});
Is it possible to make it multilang?
Well you can take advantage of the magic translator function in magento $this->_("To Translate!")
. Because PHP always runs first I don't see how you can not do the following:
new Ajax.Request(url, {
onCreate : function() {
_this.g.warn(<?php echo $this->_("Vykdoma"); ?>, {
life: 5
}
});
Then add the translate.csv
into your theme locale folder.
Vykdoma,Ongoing