<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.xna.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>Game Publishing/Business</title><link>http://forums.xna.com/forums/46.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007.1 (Build: 0.0)</generator><item><title>Re: Localization in practice</title><link>http://forums.xna.com/forums/thread/158068.aspx</link><pubDate>Thu, 02 Apr 2009 15:00:14 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:158068</guid><dc:creator>MrLeebo</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/158068.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=46&amp;PostID=158068</wfw:commentRss><description>As the author of the Extension Methods article, that solution doesn&amp;#39;t use XML files... Well, no more than C# projects in general use it.</description></item><item><title>Re: Localization in practice</title><link>http://forums.xna.com/forums/thread/155251.aspx</link><pubDate>Sat, 28 Mar 2009 07:40:59 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:155251</guid><dc:creator>Michael Ryan</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/155251.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=46&amp;PostID=155251</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://forums.xna.com//Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;Shawn Hargreaves:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;We actually have a localization sample in the works - should show up sometime over the next couple of months.
&lt;p&gt;To prepare yourself for doing this, the main thing is to load all your text from a .resx file, rather than embedding it in your source code. Even if you just have one English .resx for now (as in eg. our Network State Management sample) that will set you up ready to later add other translations.&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
Shawn,&lt;br /&gt;
&lt;br /&gt;
Thanks for the information.&amp;nbsp; I was looking at some existing articles on localization at Ziggyware (&lt;a href="http://www.ziggyware.com/readarticle.php?article_id=193"&gt;Language Localization&lt;/a&gt; and &lt;a href="http://www.ziggyware.com/readarticle.php?article_id=212"&gt;Language Localization using Extension Methods&lt;/a&gt;).&amp;nbsp; Both use XML files for targeted languages, although the &amp;quot;Extension Methods&amp;quot; articles uses the .NET ResourceManager and ResXFileCodeGenerator to compile the ResX resources into DLLs.&amp;nbsp; I wasn&amp;#39;t sure if this method would work on the Xbox360, but I later discovered that the sample you mentioned was already released, and it uses a similar method of localizing text.&lt;br /&gt;
&lt;br /&gt;
I will use the Creators Club example as reference (&lt;a href="http://creators.xna.com/sample/localization"&gt;Localization&lt;/a&gt;).&lt;br /&gt;
&lt;br /&gt;
Thanks again!&lt;br /&gt;
&lt;br /&gt;
Michael&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description></item><item><title>Re: Localization in practice</title><link>http://forums.xna.com/forums/thread/95374.aspx</link><pubDate>Mon, 06 Oct 2008 13:20:19 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:95374</guid><dc:creator>HerrUppoHoppa</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/95374.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=46&amp;PostID=95374</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://forums.xna.com//Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;Spyn Doctor:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;
&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://forums.xna.com//Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;HerrUppoHoppa:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;Very strange, my project name is ColosseumWin and it cannot be found as a namespace at all. I have a Resources.rsx in my Properties folder and I created it just the way you described. I&amp;#39;m starting to think that this may have something to do with us having manually modified the project xml...although not in a particulary advanced way. Any further thoughts? Thanks for the help. &lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;You mean you &lt;em&gt;do&lt;/em&gt; have the Properties folder and you &lt;em&gt;do&lt;/em&gt; have the Resources.resx file in it, but if you include &amp;quot;using PROJ_NAME.Properties;&amp;quot; in a class file you still can&amp;#39;t access the &amp;quot;Resources&amp;quot; class? That&amp;#39;s very strange. Don&amp;#39;t know how that could happen. An idea to test this: Create a new dummy (game-)project and see if it works in the dummy project. If yes, then it must certainly be something wrong in the configuration of your main project. Maybe by comparing the configs of the dummy and the main project you can spot the difference that causes this?&lt;/p&gt;
&lt;p&gt;Doc&lt;/p&gt;
&lt;/div&gt;&lt;/BLOCKQUOTE&gt;Yes that is exactly what I mean, and infact I get a compilation error on the project name as a name space. I tried creating a new dummy project and it worked instantly so I guess it&amp;#39;s due to manual modifications. Thanks for the help.&lt;br /&gt;</description></item><item><title>Re: Localization in practice</title><link>http://forums.xna.com/forums/thread/95045.aspx</link><pubDate>Sat, 04 Oct 2008 19:56:59 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:95045</guid><dc:creator>Spyn Doctor</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/95045.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=46&amp;PostID=95045</wfw:commentRss><description>&lt;p&gt;Hi Nifty,&lt;/p&gt;
&lt;p&gt;actually, I&amp;#39;m not sure which setting to change in Windows to test this, as I&amp;nbsp;only tested this on the XBox (there I simply changed the language setting in the dashboard). But it should be somewhere in the Windows settings. If unsure, maybe look it up on MSDN?&lt;/p&gt;
&lt;p&gt;BTW, I would recommend the reverse: Make English the default and put Spanish (and whatever other languages you also support) into&amp;nbsp;the additional Resources.xx.resx files.&lt;/p&gt;
&lt;p&gt;Because every user who has set a language that you do &lt;em&gt;not&lt;/em&gt; support will automatically get the default language. So let&amp;#39;s assume that&amp;nbsp;you support the &amp;quot;big&amp;quot; languages like Spanish, French, English, German,&amp;nbsp;Italian, Portugese , maybe Japanese/Chinese. Maybe more?&amp;nbsp;No matter how many languages you support, the list will probably never be complete. There will always be people with an unsupported language. Maybe Swedish? Or Greek? Croatian? Whatever. All these people would then get the default language. So in your case Spanish. But, and no offense against Spanish as a language intended here, I would think that English would be the better default for the vast majority of such people&amp;nbsp;who&amp;nbsp;have an unsupported&amp;nbsp;language setting.&lt;/p&gt;
&lt;p&gt;Doc&lt;/p&gt;</description></item><item><title>Re: Localization in practice</title><link>http://forums.xna.com/forums/thread/94983.aspx</link><pubDate>Sat, 04 Oct 2008 13:22:43 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:94983</guid><dc:creator>Sounds Nifty</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/94983.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=46&amp;PostID=94983</wfw:commentRss><description>Thank You Spyn Doctor for the detailed instructions on how to use the resource string tables for localization. I was able to create my Resource.resx and access the strings that were in the table just fine. My language is set to English, so for testing purposes I set my Resource.resx to be Spanish and I the created a Resource.en.resx with English tables. When I try my project I am only getting the default table (the Spanish text) and not the English. How have you been able to test your localization to make sure the correct .resx file was being used?
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Nifty&lt;/p&gt;</description></item><item><title>Re: Localization in practice</title><link>http://forums.xna.com/forums/thread/94967.aspx</link><pubDate>Sat, 04 Oct 2008 09:28:29 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:94967</guid><dc:creator>Spyn Doctor</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/94967.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=46&amp;PostID=94967</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://forums.xna.com//Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;HerrUppoHoppa:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;Very strange, my project name is ColosseumWin and it cannot be found as a namespace at all. I have a Resources.rsx in my Properties folder and I created it just the way you described. I&amp;#39;m starting to think that this may have something to do with us having manually modified the project xml...although not in a particulary advanced way. Any further thoughts? Thanks for the help. &lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;You mean you &lt;em&gt;do&lt;/em&gt; have the Properties folder and you &lt;em&gt;do&lt;/em&gt; have the Resources.resx file in it, but if you include &amp;quot;using PROJ_NAME.Properties;&amp;quot; in a class file you still can&amp;#39;t access the &amp;quot;Resources&amp;quot; class? That&amp;#39;s very strange. Don&amp;#39;t know how that could happen. An idea to test this: Create a new dummy (game-)project and see if it works in the dummy project. If yes, then it must certainly be something wrong in the configuration of your main project. Maybe by comparing the configs of the dummy and the main project you can spot the difference that causes this?&lt;/p&gt;
&lt;p&gt;Doc&lt;/p&gt;</description></item><item><title>Re: Localization in practice</title><link>http://forums.xna.com/forums/thread/94965.aspx</link><pubDate>Sat, 04 Oct 2008 09:16:36 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:94965</guid><dc:creator>Dark Schneider</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/94965.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=46&amp;PostID=94965</wfw:commentRss><description>I put the texts in a XML, then you only need 1 XML and 1 SpriteFont for any language implementing the &amp;#39;&lt;span id="nsrTitle"&gt;How To: Extend the Font Description Processor to Support
Additional Characters&lt;/span&gt;&amp;#39; example as you need special characters for some languages, and with 1 SpriteFont for any language you remove that worry, selecting the corresponfing text file for any language in content properties. Then, you only need to implement:
&lt;ul&gt;
    &lt;li&gt;Create a &amp;#39;String language&amp;#39; var. to store the language.&lt;/li&gt;
    &lt;li&gt;At beginning you can auto-select from system config., and allow users to modify it manually. How to do this:
    &lt;ul&gt;
        &lt;li&gt;User selection is easy, you have options and then assign the correct &amp;#39;language=es&amp;#39;, &amp;#39;language=en&amp;#39;, language=jp&amp;#39;, etc. depending on user selection.&lt;/li&gt;
        &lt;li&gt;Auto-selection, simply implement a method like this:&lt;/li&gt;
    &lt;/ul&gt;
    &lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div style="overflow:auto;background-color:white;width:100%;height:245px;font-family:Courier New;font-size:11px;"&gt;
&lt;table style="border-width:0px;margin:2px 0px;width:99%;border-collapse:collapse;" cellpadding="0" cellspacing="0"&gt;
    
    
        &lt;tr&gt;
            &lt;td&gt;&lt;font style="font-size:11px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font style="color:blue;"&gt;public&lt;/font&gt;&lt;font style="font-size:11px;"&gt;&amp;nbsp;&lt;/font&gt;&lt;font style="color:blue;"&gt;void&lt;/font&gt;&lt;font style="font-size:11px;"&gt;&amp;nbsp;SetGameSystemLanguage()&amp;nbsp;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font style="color:blue;"&gt;int&lt;/font&gt;&lt;font style="font-size:11px;"&gt;&amp;nbsp;culture&amp;nbsp;=&amp;nbsp;CultureInfo.CurrentUICulture.LCID;&amp;nbsp;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font style="color:blue;"&gt;switch&lt;/font&gt;&lt;font style="font-size:11px;"&gt;&amp;nbsp;((culture&amp;nbsp;&amp;amp;&amp;nbsp;0x00FF))&amp;nbsp;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font style="color:blue;"&gt;case&lt;/font&gt;&lt;font style="font-size:11px;"&gt;&amp;nbsp;0x000a:&amp;nbsp;&lt;/font&gt;&lt;font style="color:green;"&gt;//español&lt;/font&gt;&lt;font style="font-size:11px;"&gt;&amp;nbsp;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;szLanguage&amp;nbsp;=&amp;nbsp;&lt;font style="color:blue;"&gt;&amp;quot;es&amp;quot;&lt;/font&gt;&lt;font style="font-size:11px;"&gt;;&amp;nbsp;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font style="color:blue;"&gt;break&lt;/font&gt;&lt;font style="font-size:11px;"&gt;;&amp;nbsp;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font style="color:blue;"&gt;case&lt;/font&gt;&lt;font style="font-size:11px;"&gt;&amp;nbsp;0x0011:&amp;nbsp;&lt;/font&gt;&lt;font style="color:green;"&gt;//japonés&lt;/font&gt;&lt;font style="font-size:11px;"&gt;&amp;nbsp;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;szLanguage&amp;nbsp;=&amp;nbsp;&lt;font style="color:blue;"&gt;&amp;quot;jp&amp;quot;&lt;/font&gt;&lt;font style="font-size:11px;"&gt;;&amp;nbsp;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font style="color:blue;"&gt;break&lt;/font&gt;&lt;font style="font-size:11px;"&gt;;&amp;nbsp;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font style="color:blue;"&gt;default&lt;/font&gt;&lt;font style="font-size:11px;"&gt;:&amp;nbsp;&lt;/font&gt;&lt;font style="color:green;"&gt;//inglés&lt;/font&gt;&lt;font style="font-size:11px;"&gt;&amp;nbsp;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;szLanguage&amp;nbsp;=&amp;nbsp;&lt;font style="color:blue;"&gt;&amp;quot;en&amp;quot;&lt;/font&gt;&lt;font style="font-size:11px;"&gt;;&amp;nbsp;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font style="color:blue;"&gt;break&lt;/font&gt;&lt;font style="font-size:11px;"&gt;;&amp;nbsp;&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&lt;/td&gt;
        &lt;/tr&gt;
    
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;See that the szLanguage is the &amp;#39;String language&amp;#39;. You have all the
codes in documentation, we generally only need the last 8-bit.&lt;/p&gt;
&lt;p&gt;Then now you only in the LoadContent() methods add the language
string to localized contents, so for texts we have: texts_en.xml,
texts_es.xml, text_jp.xml, and maybe for some textures we have
poster_en, poster_es, poster_jp, etc. See that the important is the
content name, so text_en.xml is text_en to do the following:&lt;/p&gt;
&lt;p&gt;Content.Load&amp;lt;Type&amp;gt;(&amp;quot;content_&amp;quot; + language); look at the &amp;#39;_&amp;#39; added, this depends on your content names, I usually add the &amp;#39;_&amp;#39; for no confusing names (like textsen).&lt;/p&gt;
And
voilà, you have your localized content of any type loaded. If you want
to change language with no need to quit and restart the game you only
need to reload the current loaded content.</description></item><item><title>Re: Localization in practice</title><link>http://forums.xna.com/forums/thread/94851.aspx</link><pubDate>Fri, 03 Oct 2008 17:40:38 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:94851</guid><dc:creator>HerrUppoHoppa</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/94851.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=46&amp;PostID=94851</wfw:commentRss><description>Very strange, my project name is ColosseumWin and it cannot be found as a namespace at all. I have a Resources.rsx in my Properties folder and I created it just the way you described. I&amp;#39;m starting to think that this may have something to do with us having manually modified the project xml...although not in a particulary advanced way. Any further thoughts? Thanks for the help.
&lt;p&gt;Regards&lt;/p&gt;</description></item><item><title>Re: Localization in practice</title><link>http://forums.xna.com/forums/thread/94847.aspx</link><pubDate>Fri, 03 Oct 2008 17:32:52 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:94847</guid><dc:creator>Spyn Doctor</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/94847.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=46&amp;PostID=94847</wfw:commentRss><description>&lt;p&gt;If your project is a standard game project (created from a VS template), then in your project folder you should have a folder &amp;quot;Properties&amp;quot;, which by default contains the &amp;quot;AssemblyInfo.cs&amp;quot; class. If you add the default&amp;nbsp;resources (as described in my posting above, via the &amp;quot;Click here to create one&amp;quot; link), then this is where the Resources.resx file will be created too. So that&amp;#39;s the folder/namespace you are looking for). All you need should be a &lt;/p&gt;
&lt;p&gt;using PROJECT_NAME.Properties;&lt;/p&gt;
&lt;p&gt;line in your code...&lt;/p&gt;
&lt;p&gt;Doc&lt;/p&gt;</description></item><item><title>Re: Localization in practice</title><link>http://forums.xna.com/forums/thread/94518.aspx</link><pubDate>Thu, 02 Oct 2008 09:31:59 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:94518</guid><dc:creator>HerrUppoHoppa</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/94518.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=46&amp;PostID=94518</wfw:commentRss><description>I can&amp;#39;t seem to find the Properties namespace anywhere, I tried the RootNamespace defined in the project xml, I tried browings through the system namespace. Some page on msdn said it is located in the namespace with the same name as the visual studio project but I can&amp;#39;t even find that...I&amp;#39;m kind of lost here.&lt;br /&gt;</description></item><item><title>Re: Localization in practice</title><link>http://forums.xna.com/forums/thread/94338.aspx</link><pubDate>Wed, 01 Oct 2008 16:07:21 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:94338</guid><dc:creator>Shawn Hargreaves</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/94338.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=46&amp;PostID=94338</wfw:commentRss><description>Our sample shows how to use .resx files for string localization, plus some other stuff: how to localize other non-text assets (textures, sounds, etc), and how to build fonts for East Asian languages with ridiculously large character sets.&lt;br /&gt;</description></item><item><title>Re: Localization in practice</title><link>http://forums.xna.com/forums/thread/94293.aspx</link><pubDate>Wed, 01 Oct 2008 14:28:36 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:94293</guid><dc:creator>Johnny Herring</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/94293.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=46&amp;PostID=94293</wfw:commentRss><description>Ahh thanks Spyn Doc, that&amp;#39;s even better news. =)&lt;br /&gt;</description></item><item><title>Re: Localization in practice</title><link>http://forums.xna.com/forums/thread/94259.aspx</link><pubDate>Wed, 01 Oct 2008 10:03:08 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:94259</guid><dc:creator>Spyn Doctor</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/94259.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=46&amp;PostID=94259</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://forums.xna.com//Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;Johnny Herring:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;Shawn: I look forward to see the solution you&amp;#39;re up to.&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;The .resx file solution&amp;nbsp;Shawn mentioned (for which the XNA team has a sample in the works) is exactly what I have described above. (At least that&amp;#39;s what I assume. :) )&lt;/p&gt;
&lt;p&gt;Doc&lt;/p&gt;</description></item><item><title>Re: Localization in practice</title><link>http://forums.xna.com/forums/thread/94253.aspx</link><pubDate>Wed, 01 Oct 2008 09:29:36 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:94253</guid><dc:creator>Johnny Herring</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/94253.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=46&amp;PostID=94253</wfw:commentRss><description>Thanks alot guys, you&amp;#39;re awesome!
&lt;p&gt;Shawn: I look forward to see the solution you&amp;#39;re up to.&lt;/p&gt;</description></item><item><title>Re: Localization in practice</title><link>http://forums.xna.com/forums/thread/94088.aspx</link><pubDate>Tue, 30 Sep 2008 16:13:08 GMT</pubDate><guid isPermaLink="false">4aa5dbf6-357b-46b2-b5b2-1b660a6dc370:94088</guid><dc:creator>Spyn Doctor</dc:creator><slash:comments>0</slash:comments><comments>http://forums.xna.com/forums/thread/94088.aspx</comments><wfw:commentRss>http://forums.xna.com/forums/commentrss.aspx?SectionID=46&amp;PostID=94088</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="http://forums.xna.com//Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;Johnny Herring:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;Are you talking about something like this &lt;a href="http://www.ziggyware.com/readarticle.php?article_id=193"&gt;http://www.ziggyware.com/readarticle.php?article_id=193&lt;/a&gt;?&lt;br /&gt;
&lt;p&gt;This system looks great, unfortually we&amp;#39;ve not worked like this from the start making it a bit tricky to change as we&amp;#39;re quite far into the project.&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;No, that&amp;#39;s not what I meant. This is a custom solution too, as far as I can see, not the built-in solution. However, all solutions, even the built-in solution, will not come cheap if you are already far into your project and currently have all strings hard coded. Because all solutions are similar in one way: You have to pull out all hard coded strings from your code and put them into key/value-structured lookup tables/arrays/whatever, and instead of having the hard coded text in the code, you then have a lookup access in your code, with the&amp;nbsp;matching key for that occasion. This is a bullet you will have to bite if you want localization (which is why it&amp;#39;s always a good idea to support localization right from the start. :) )&lt;/p&gt;
&lt;p&gt;The built-in system has the advantage, that it handles the language detection automagically:&lt;/p&gt;
&lt;p&gt;In the solution explorer, right-click on the project name, then select &amp;quot;Properties&amp;quot;. Then from the tabs on the left, select &amp;quot;Resources&amp;quot;. If it says &amp;quot;This project does not contain a default resources file. Click here to create one.&amp;quot;, then do so, i.e. &amp;quot;click here&amp;quot;. &lt;br /&gt;
What you get is the default string table, where you can enter resources with &amp;quot;name&amp;quot; and &amp;quot;value&amp;quot; (and a &amp;quot;comment&amp;quot;, but I seldomly use this). This is the key/value pair I was talking about (only they call it name, instead of key).&lt;br /&gt;
This default string table is for the default language: The framework will always try to read the settings of the user (i.e. either the Windows settings or the XBox settings) to find out which locale the user has currently selected. The framework will then try to use the string table that matches the language for&amp;nbsp;this locale. If there is no matching string table, the framework will then select the default string table. So it is usually best to use English in this default string table (unless you are targeting a local market, but then you probably wouldn&amp;#39;t be asking about localization in the first place).&lt;/p&gt;
&lt;p&gt;So what you do is, that for any text that is used anywhere in the game, you make an entry here in this string table, with the English text as the &amp;quot;value&amp;quot; and a meaningful name as the &amp;quot;name&amp;quot;. Then in your game, at any location where you need this text, instead of writing the text string itself, you write &amp;quot;Properties.&lt;em&gt;name&lt;/em&gt;&amp;quot; instead, where you replace &amp;quot;&lt;em&gt;name&lt;/em&gt;&amp;quot; with the name of the text that you want to appear. Which is why you should use a &amp;quot;meaningful&amp;quot; name, so that in your code, the &amp;quot;name&amp;quot; will give you a clue of what text will later be used.&lt;/p&gt;
&lt;p&gt;For example, if you have a &amp;quot;settings&amp;quot; dialog that is supposed to have the title &amp;quot;Game Settings&amp;quot;, then in the string table you would create an entry&lt;/p&gt;
&lt;p&gt;&lt;font face="Courier New"&gt;Name:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Value:&lt;br /&gt;
SettingsDialog_Title&amp;nbsp;&amp;nbsp; Game Settings&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;and in your code, wherever you need this text you would simply write &amp;quot;Resources.SettingsDialog_title&amp;quot;. For example:&lt;/p&gt;
&lt;p&gt;&lt;font face="Courier New"&gt;dialog.SetTitle(Resources.SettingsDialog_Title);&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;(You may need a &amp;quot;using YOURGAME.Properties&amp;quot; directive for the &amp;quot;Resources&amp;quot; class to become available.)&lt;/p&gt;
&lt;p&gt;Transfer&amp;nbsp;all your hard-coded texts into the string table in this fashion. At the end, you will have a game that will always display in the default language (assumably English).&lt;/p&gt;
&lt;p&gt;Actually, to edit the string table, you don&amp;#39;t have to go via Solution Explorer -&amp;gt; Right Click Project -&amp;gt; Properties -&amp;gt; Resources. There&amp;#39;s also a direct access to this table:&lt;/p&gt;
&lt;p&gt;In your solution explorer, under the project, there&amp;#39;s a folder called &amp;quot;Properties&amp;quot;. If you open it you will now find a file called &amp;quot;Resources.resx&amp;quot;. Just double click this file to open the default string table.&lt;/p&gt;
&lt;p&gt;Then you can start to localize&amp;nbsp;the game for&amp;nbsp;a new language, by adding another string table, which comes in form of another Resources.resx file, only with a slightly different name for each language: The name is Resources.xx.resx, where you need to replace&amp;nbsp;xx with the two-letter language code (lower case) of the desired language. For example, if you wanted to do German, you would need a file called &amp;quot;Resources.de.resx&amp;quot;.&lt;/p&gt;
&lt;p&gt;In Visual Studio 2005 Express there only seem to be &amp;quot;roundabout&amp;quot; ways&amp;nbsp;for&amp;nbsp;creating such a Resources.xx.resx file (this may be improved in VSE 2008?). The easiest one is probably this one:&lt;/p&gt;
&lt;p&gt;In the solution explorer, right click on the project name, then select &amp;quot;Add -&amp;gt; New Item&amp;quot;. In the dialog, make sure to select the &amp;quot;Resources File&amp;quot; template and as the name, enter &amp;quot;Resource.xx.resx&amp;quot; (with &amp;quot;xx&amp;quot; replaced according for your target language).&lt;/p&gt;
&lt;p&gt;This will create the file in the project root folder. From there you need to move it to the &amp;quot;Properties&amp;quot; folder. Cut&amp;amp;Paste won&amp;#39;t work, because the right-click menu on the &amp;quot;Properties&amp;quot; folder doesn&amp;#39;t offer &amp;quot;Paste&amp;quot;. But you can simply move the file with drag&amp;amp;drop. I.e. inside of the solution explorer, simply drag the file from its location in the project root folder into the &amp;quot;Properties&amp;quot; folder. &lt;/p&gt;
&lt;p&gt;Double clicking the file now opens a string table similar to the default string table describe above - only initially empty.&lt;/p&gt;
&lt;p&gt;Copy all entries from the default string table to this language specific string table, then translate the texts in the &amp;quot;Value&amp;quot; column to your target language. If you later add more entries to your default table, remember to also add them to all language specific tables (and translate them there). Or if you change a value in the default table, also change it in the language tables. Similarly for deleting values...&lt;/p&gt;
&lt;p&gt;That&amp;#39;s it, nothing more to do! Especially: You don&amp;#39;t need any code changes to support the new language!&lt;/p&gt;
&lt;p&gt;If you faithfully used &amp;quot;Resources.&lt;em&gt;name&lt;/em&gt;&amp;quot; everywhere in the code (as described above), then each occurrence of a certain &amp;quot;name&amp;quot; will&amp;nbsp;&lt;em&gt;automatically&lt;/em&gt;&amp;nbsp;be replaced with the value from the language specific string table that matches the language settings of the user (in Windows or the XBox dashboard), or if there is no specific language table for that language, the text from the default table will be used.&lt;/p&gt;
&lt;p&gt;Doc&lt;/p&gt;
&lt;p&gt;P.S. You may notice that in the solution explorer the Resources.resx file has a little &amp;quot;+&amp;quot; icon before it, that you can use to unfold a &amp;quot;child&amp;quot; file called Resources.Designer.cs. But the Resources.xx.resx files don&amp;#39;t have this. You can safely ignore this. It&amp;#39;s part of the framework &amp;quot;magic&amp;quot; that you don&amp;#39;t need to care about (and you also don&amp;#39;t need to edit the Resources.Designer.cs file, as this file is generated automatically).&lt;/p&gt;
&lt;p&gt;P.P.S. The Resources.xx.resx files are XML, so&amp;nbsp;if you have a translater who doesn&amp;#39;t work with Visual Studio (for example an external translator) then he can edit the XML directly.&lt;/p&gt;</description></item></channel></rss>