<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Windows Forms Documentation Updates : Windows Forms Globalization and Localization</title><link>http://blogs.msdn.com/winformsue/archive/tags/Windows+Forms+Globalization+and+Localization/default.aspx</link><description>Tags: Windows Forms Globalization and Localization</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Can You Change the User Interface Language at Runtime in Windows Forms?</title><link>http://blogs.msdn.com/winformsue/archive/2006/06/13/628824.aspx</link><pubDate>Tue, 13 Jun 2006 02:28:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:628824</guid><dc:creator>Jay A. Allen</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/winformsue/comments/628824.aspx</comments><wfw:commentRss>http://blogs.msdn.com/winformsue/commentrss.aspx?PostID=628824</wfw:commentRss><wfw:comment>http://blogs.msdn.com/winformsue/rsscomments.aspx?PostID=628824</wfw:comment><description>Someone asked that question recently on an internal alias. Michael Kaplan, one of our localization gurus, says "not a week goes by" that he doesn't get that question. &lt;a href="http://blogs.msdn.com/michkap/archive/2006/05/27/608625.aspx"&gt;Sadly, he has some bad news&lt;/a&gt; for those looking to swap Japanese with French on the fly.&lt;br&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=628824" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/winformsue/archive/tags/Windows+Forms+Globalization+and+Localization/default.aspx">Windows Forms Globalization and Localization</category></item><item><title>Forms-Based Resources vs. Project Resources</title><link>http://blogs.msdn.com/winformsue/archive/2006/01/31/521297.aspx</link><pubDate>Wed, 01 Feb 2006 03:26:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:521297</guid><dc:creator>WinFormsUE</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/winformsue/comments/521297.aspx</comments><wfw:commentRss>http://blogs.msdn.com/winformsue/commentrss.aspx?PostID=521297</wfw:commentRss><wfw:comment>http://blogs.msdn.com/winformsue/rsscomments.aspx?PostID=521297</wfw:comment><description>&lt;p&gt;A recent bug (okay, it's WAY old and I only just got to it - my bad) makes it clear that we don't differentiate clearly enough in our documentation between forms-based resources and project resources. So here's the skinny. (I've added some of this information &lt;a href="http://lab.msdn.microsoft.com/searchbeta/Redirect.aspx?title=Walkthrough%3a+Localizing+Windows+Forms&amp;amp;url=http://msdn2.microsoft.com/en-us/library/y99d1cd3.aspx"&gt;to our walkthrough&lt;/a&gt; for the next doc update.)&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Forms-based resources&lt;/em&gt; are created when you set the &lt;strong&gt;Localizable&lt;/strong&gt; design-time attribute on a &lt;strong&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/system.windows.forms.form.aspx"&gt;Form&lt;/a&gt;&lt;/strong&gt; to true, and then set specific resources for various settings of the &lt;strong&gt;Language&lt;/strong&gt; attribute. On Image properties, such as &lt;strong&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/system.windows.forms.control.backgroundimage.aspx"&gt;BackgroundImage&lt;/a&gt;&lt;/strong&gt; on &lt;strong&gt;Form&lt;/strong&gt; or &lt;strong&gt;Image&lt;/strong&gt; on &lt;strong&gt;&lt;a href="http://lab.msdn.microsoft.com/searchbeta/Redirect.aspx?title=PictureBox+Class+(.NET+Framework)&amp;amp;url=http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemwindowsformspictureboxclasstopic.asp"&gt;PictureBox&lt;/a&gt;&lt;/strong&gt;, when you use the snazzy new &lt;strong&gt;Import...&lt;/strong&gt; button, you are importing a forms-based resource. (The UI calls it a "local resource".) Forms-based resources are weakly typed behind the scenes. Usually this is fine, as Visual Studio takes care of all the messy details for you of generating satellite assemblies and switching resources based on the current UI culture.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Project resources&lt;/em&gt; are created manually, by adding a new project resources file for a specific language. The plus side is that project resources are strongly typed, and thus easier to manipulate programmatically.&lt;/p&gt;
&lt;p&gt;What resource type should you use when? In general, use forms-based resources for anything that's form-specific; use project resources for error strings, or anything else that is application-global or that you need to assign programmatically. &lt;/p&gt;
&lt;p&gt;Here's an important tip, though: &lt;strong&gt;NEVER mix resource types for the same property!&lt;/strong&gt; The bug I received was created because a customer tried to set the default &lt;strong&gt;Image&lt;/strong&gt; on a &lt;strong&gt;PictureBox&lt;/strong&gt; using a project resource, then set language variants using the &lt;strong&gt;Import...&lt;/strong&gt; button (which uses forms-based resources). The result? We ignore the project resources entirely, so the default image never showed up. &lt;/p&gt;
&lt;p&gt;Let me know if this isn't clear, or if you feel the walkthrough could use even more detail. There's still time to get more text in before the next doc update!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=521297" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/winformsue/archive/tags/Windows+Forms+Globalization+and+Localization/default.aspx">Windows Forms Globalization and Localization</category></item></channel></rss>