How to Use Internalization i18n in a Controller in SAPUI5?

后端 未结 2 1592
一生所求
一生所求 2021-01-25 08:25

Could anyone please explain how it\'s possible to use a i18n text in a setValueStateText method in a controller?

oTP.setValueStateText(\"{i18n>co_Maximal_60_h         


        
2条回答
  •  不要未来只要你来
    2021-01-25 09:07

    the resource bundle is in the following way accessible in a controller:

    ...
      var oResourceBundle = this.getView().getModel("i18n").getResourceBundle();
      oTP.setValueStateText(oResourceBundle.getText("co_Maximal_60_h"));
    ...
    

提交回复
热议问题