Localization behavior is working fine for me, but i don't know if i can use it in a ready function and how.
If I use {{localize('greeting')}}
in html, Its working fine. But I need to use through function
initErrorMessage: function(loc) {
return localize(loc);
},
And I need to use in property as well.
datePickerRangeArray: {
type: Array,
value: function() {
return [
{"key": "!h8", "val": this.localize('last8hrs')},
{"key": "!h12", "val": this.localize('last12hrs')},
{"key": "!h24", "val": this.localize('last24hrs')},
{"key": "!h168", "val": this.localize('last48hrs')},
{"key": "current-day", "val": this.localize('CurrentDay')},
{"key": "previous-day", "val": this.localize('PreviousDay')}];
}
}
I am getting error on this. How to achieve this. Thanks in advance.