I am currently working on a project for a big company and they want me to change their website into a multilingual website with as little refactoring of code as possible. They currently have the following setup for a dropdown list:
<select id="selectStatus" runat="server" title="Select Status" class="standardValue" clientidmode="Static">
<option value="optionValue">
selected="selected">TEXT TEXT TEXT TEXT</option>
<option value="Completed">TEXT TEXT TEXT TEXT</option>
<option value="">TEXT TEXT TEXT TEXT</option>
</select>
I was wanting to replace the text as a referance eg.
<option value="Completed"><%= LanguageResources.CommonStrings.ALERT_HDR_ACCOUNTNO %></option>
But this wont work because it wont let me insert a "code block" as the text attribute, is there any other way of doing this?
Thanks in advance, James.
Why dont you set up a language master table and bind your dropdownlist with it & Use asp:Dropdownlist instead of select.
OR
Simply,
List<string> s = new List<String>();
s.Add(LanguageResources.CommonStrings.ALERT_HDR_ACCOUNTNO);
s.Add(LanguageResources.CommonStrings.ALERT_HDR_ACC);
s.Add(LanguageResources.CommonStrings.ALERT_HDR_ACCOUNT);
s.Add(LanguageResources.CommonStrings.ALERT_HDR_NO);
Bind this list to dropdown.