I need a drop down control showing all the list of Countries (it should be a part of Billing address form).
I could the contries list from Epi Commerce (like this code from Quicksilver project):
countryManager.GetCountries().Country.Select(x => new CountryViewModel { Code = x.Code, Name = x.Name });
However, here I will have the Names in English. And theses names have to be localizable. I wonder if there is some in-build nice solution for such cases.
At the moment I was reviewing certain technical solutions, but none looks very good for me:
- Having a key-value pair for each country code - This one already failed as EpiServer doesn't work well with a huge key-value pair list. I was not able to update page's properties in Edit mode.
- Using .Net in-build solution with CultureInfo/Region. This option covers around 50% of the list for me, so it would be just confusing for the user especially if there is non-latin alphabet
- Using translation links @Html.Translate("") for each country iso code. This is going to be an option. But it would be really horrible for the content editors to work in such way. It would be a better option if I could create aftergenerated list of translation objects.