Quantcast
Channel: Developer to developer
Viewing all articles
Browse latest Browse all 9076

Localizable Country List in EPiServer Commerce

$
0
0

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:

  1. 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.
  2. 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
  3. 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.

Viewing all articles
Browse latest Browse all 9076

Trending Articles