on 05-20-2019 7:52 AM
Hello Experts,
I am building a demo app in SAP UI5. I am just trying to replace hard coded text for Page Title for index.html page with I18n page attribute. This is a very simple exercise but I am facing difficulty. Can anybody explain, how i can achieve this?
Regards,
Narinder Pal Singh
Hi Narinder,
This approach isn't working because the index.html file is loaded before the SAPUI5 bootstrapping started and therefore the i18n files haven't been parse by then.
What you can do, is setting the title manually as suggested here.
document.title = <string from i18n file>;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Narinder, You can use hook methods to get results.
onAfterRendering : {
document.title = this.getView().getModel("i18n").getResourceBundle().getText("<>");
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.