我正试图用一个变量替换busyindicator构造函数中的文本值,而不是对其进行硬编码。但由于某些原因,应用程序无法理解该变量。。。
function wlCommonInit(){
var locale = "Caricamento";
var busyIndicator = new WL.BusyIndicator('content',{text:locale});
busyIndicator.show();
}
WL.BusyIndicator的text
选项需要一个string
,因此您可能不会放置变量。
相反,请使用WL.ClientMessages
。例如:
var busy;
function wlCommonInit(){
WL.ClientMessages.loading = "טוען...";
busy = new WL.BusyIndicator();
busy.show();
}
阅读材料:
- 启用翻译培训模块,幻灯片#8