var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-333696-1']); _gaq.push(['_trackPageview']); _gaq.push(['_trackPageLoadTime']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();
  • 2009年09月28日

    从CultureInfo.EnglishName获取对应的CultureInfo

    分类:

    EnglishName来自于System.Globalization.RegionInfo.CurrentRegion.EnglishName;

     

    下面给出示例:

    [C#]

    using System.Globalization;

     

                foreach (CultureInfo ci in CultureInfo.GetCultures(CultureTypes.InstalledWin32Cultures))

                {

                    if (this.textBox1.Text.Trim()!= "" && ci.EnglishName == this.textBox1.Text.Trim())

                    {

                        //ToDo

                        break;

                    }

    分享到: