{"id":5066,"date":"2014-03-30T18:31:47","date_gmt":"2014-03-30T18:31:47","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/change-language-in-c-collection-of-common-programming-errors\/"},"modified":"2014-03-30T18:31:47","modified_gmt":"2014-03-30T18:31:47","slug":"change-language-in-c-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/change-language-in-c-collection-of-common-programming-errors\/","title":{"rendered":"Change Language in C#-Collection of common programming errors"},"content":{"rendered":"<p>To select a whole new culture, set the <code>CurrentThread.CurrentCulture<\/code> to a new culture, e.g. to set to French:<\/p>\n<pre><code>System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo(\"fr-FR\");\nSystem.Threading.Thread.CurrentThread.CurrentCulture = ci;\n<\/code><\/pre>\n<p>You can find a list of the predefined <code>CultureInfo<\/code> names here.<\/p>\n<p>If you want to change certain aspects of the default culture, you can grab the current thread&#8217;s culture, use it it&#8217;s name to create a new CultureInfo instance and set the thread&#8217;s new culture with some changes, e.g. to change the current culture to use the &#8216;Euro&#8217; symbol:<\/p>\n<pre><code>System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo( System.Threading.Thread.CurrentThread.CurrentCulture.Name);\nci.NumberFormat.CurrencySymbol = \"?\";\nSystem.Threading.Thread.CurrentThread.CurrentCulture = ci;\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>To select a whole new culture, set the CurrentThread.CurrentCulture to a new culture, e.g. to set to French: System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo(&#8220;fr-FR&#8221;); System.Threading.Thread.CurrentThread.CurrentCulture = ci; You can find a list of the predefined CultureInfo names here. If you want to change certain aspects of the default culture, you can grab the current thread&#8217;s culture, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5066","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5066","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5066"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5066\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5066"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5066"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5066"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}