I am working on an SAPUI5 application. We are using i18n localization concept wherein we have declared properties for all static texts on our application and assigned values to them that can be used for example like this:
var oButton = new sap.ui.commons.Button();
oButton.setText(oBundle.getText("LOGIN_BUTTON_NAME"));
Now I have a requirement where certain label texts have to be updated dynamically based on user settings. And these texts are defined in the i18n bundle. So I am looking for something like:
//Update i18n bundle
oBundle.setText("USERNAME_LABEL", "Username");
//Use updated value
oLabel.setText(oBundle.getText("USERNAME_LABEL"));
But I couldn't find a setText()
method anywhere.
Any help will be deeply acknowledged.