none
Create a CultureInfo from just the country? RRS feed

Answers

  • Hi David,

    Please try the below code, also as you said the language doesn't matter, so in below code i am picking any first CultureInfo entry available for given country, as in my example i took AU for Australia.

    var cultureInfo = CultureInfo.GetCultures(CultureTypes.AllCultures).Where(c => c.Name.EndsWith("AU")).FirstOrDefault();

    Also make sure that you pass correct country code, for reference you can check the list at http://msdn.microsoft.com/en-us/library/ee825488(v=cs.20).aspx

    Thanks,
    Amit
    ----------------

    Please mark this as answer/helpful if this helps you
    • Edited by Amit Tonk Saturday, October 12, 2013 10:33 AM
    • Marked as answer by DavidThi808 Saturday, October 12, 2013 11:46 AM
    Saturday, October 12, 2013 10:32 AM

All replies

  • Hi David,

    Please try the below code, also as you said the language doesn't matter, so in below code i am picking any first CultureInfo entry available for given country, as in my example i took AU for Australia.

    var cultureInfo = CultureInfo.GetCultures(CultureTypes.AllCultures).Where(c => c.Name.EndsWith("AU")).FirstOrDefault();

    Also make sure that you pass correct country code, for reference you can check the list at http://msdn.microsoft.com/en-us/library/ee825488(v=cs.20).aspx

    Thanks,
    Amit
    ----------------

    Please mark this as answer/helpful if this helps you
    • Edited by Amit Tonk Saturday, October 12, 2013 10:33 AM
    • Marked as answer by DavidThi808 Saturday, October 12, 2013 11:46 AM
    Saturday, October 12, 2013 10:32 AM
  • Saturday, October 12, 2013 11:47 AM