Hawk
Posts: 0
Joined: Mon Aug 04, 2014 11:23 am

Using Select menu with localStorage to Suppot Multilingual

My page contains two componenets:
1) Caption/header: has the text "input"
2) Select menu: has two options (English, German).

I want when I chose one of these langauge, the translation of "input" appears on the header.

a) I created two translation.json files for both langauges and inserted the following :
de-DE:

{
"input":"Eingabetext"
}

en-EN:
{
"input":"Input text"
}

b) I added the even (typeList, value change, run java script) to the select menue:

var selectedValue = this.value;
var data = { 'English': ['English', 'German']};

var dropDown = $('[name=typeList]');
dropDown.html('');
var newData = data[selectedValue];
for(i = 0; i < newData.length; i++) {
dropDown.append('' + newData + '');
}
dropDown.selectmenu('refresh');

My questions (please bear with me):
1) When I test the app it shows English (default). When I select German from the select menue, it changes to 'German' but the header does not change to "Eingabetext"
2) Where in the steps above should I change to store language in localStorage.

Hawk
Posts: 0
Joined: Mon Aug 04, 2014 11:23 am

Using Select menu with localStorage to Suppot Multilingual

Sure, Thank you

Hawk
Posts: 0
Joined: Mon Aug 04, 2014 11:23 am

Using Select menu with localStorage to Suppot Multilingual

Thanks, but that thread was marked answered. How to unmark it so I can continue receiving feedback?

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Using Select menu with localStorage to Suppot Multilingual

Hello!

You will receive a feedback here https://getsatisfaction.com/apperyio/..., I promise:)

Return to “Issues”