on 2015 May 14 7:22 AM
Hi Experts,
I have a requirement to display a select box in different languages based on user logon.
I have created a sap.m.select box and bind it to Local JSON Model. This select box display the Weeks. Please refer below screen shot.
I have maintained the i18n folder and able to convert the view text into different languages.
Following is the XML code:
<Select id="idSelectWeek" width="10em" change="onSelectWeekChange"
autoAdjustWidth="true" items="{localDataModel>/Weeks}" selectedKey="0">
<core:Item key="{localDataModel>id}" text="{localDataModel>text}"
</Select>
Local JSON Model:
{
"Weeks": [
{
"id": "0",
"type": "W1",
"text": "Week 1"
},
{
"id": "1",
"type": "W2",
"text": "Week 2"
},
{
"id": "2",
"type": "W3",
"text": "Week 3"
},
{
"id": "3",
"type": "W4",
"text": "Week 4"
},
{
"id": "4",
"type": "W5",
"text": "Week 5"
}
]
}
Please guide me through the solution.
Thanks in advance.
Regards,
Abhijeet
Hello,
Have a look into the concept of localization in sapui5. the below link will provide the concept of it,
Use of Localized Texts in Applications - UI Development Toolkit for HTML5 (SAPUI5) - SAP Library
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
66 | |
11 | |
11 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.