Hi Everybody,
I'm currently trying to implement how to access the localized text using data binding in SAPUI5.
Reference code is here:
var oModel =new sap.ui.model.resource.ResourceModel({bundleName:"myBundle",bundleLocale:"en"});
var oControl =new sap.ui.commons.Button({
id :"myButton",
text :"{i18n>MY_BUTTON_TEXT}"
});
oControl.setModel(oModel,"i18n");
I have few doubts:
1) Where do we give the .properties file?
2)Instead of myBundle are we supposed to give the path of the property file?
3)Why do we use the i18n in the text?
4)What does oModel.getResourceBundle() do?
It would be really helpful if someone can give me the exact procedure or a sample code of doing it.
Thanks in advance.