const locale = {
fr: {
login_page_title_welcome: "a",
BKUE_status: "b",
UNCN_status: "c",
NNTA_status: "d",
}
};
var l = locale["fr"];
$.fn.locale=function(i) {
this.html(l.i);
this.attr('locale', ""+i+"");
};
I have the const
and I want to update an elements html and add an attribute using a custom method.
login_div_UNCN.locale('UNCN_status');
The attribute
is added by the method. But the html
is not updated.
Am I doing something wrong?