on 2016 Aug 05 12:41 PM
Hello expert,
When we create any application from template then by default it create i18n.properties file and a resource model named i18n in Manifest.json. we use this model in our application.
Now i have created i18n_de.properties file with German text and wants to use in the application when logon language in DE.
how can i make same resource model i18n to work for German language also ?
Thanks,
Abhishek
Request clarification before answering.
Hi Abhishek,
The language file that will be selected for the i18n would be based on the locale data that comes from the browser. If the browser detects the user's language is German then it the UI5 libraries will pick the appropriate i18n file so that the proper translated texts can be displayed when the application is executed.
Regards,
Ryan Crosby
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ryan,
So you mean to say no need of any coding required for the model.
For default i18n file :
We have model in manifest.json file
"models": {
"i18n": {
"type": "sap.ui.model.resource.ResourceModel",
"settings": {
"bundleName": "Learning.i18n.i18n"
}
}
here bundle name refers to i18n.proprieties.
So i have to just create i18n_de.properties and i can use same i18n as model to get the german text ?
Thanks,
Abhishek
Hello Abhishek,
Please have a look at the following content:
Step 4: Internationalization - UI Development Toolkit for HTML5 (SAPUI5) - SAP Library
Regards
Ugur
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
74 | |
30 | |
9 | |
7 | |
7 | |
6 | |
6 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.