title: Multi-Language and Resource Files
body: <p>I have a question about creating a multi-language application and the use of resource files. I will explain what I have done and what I would like the final product to be like.</p>
  
  <p>I am doing this in VB.Net and using Visual Studio 2008</p>
  
  <p>After creating a new project, I added a resource file to the project (Add -> New Item, Selected Resource File, named it Resource1.resx).</p>
  
  <p>I then double clicked the resource file and was able to add some names and values. For example,</p>
  
  <p>Name – lblFirstName, value – John
  Name – lblLastName, value – Smith</p>
  
  <p>On my form, I have 2 labels: FirstName, and LastName</p>
  
  <p>In Code, I added</p>
  
  <pre><code>FirstName.Text = My.Resources.Resource1.lblFirstName
  LastName.Text = My.Resources.Resource1.lblLastName 
  </code></pre>
  
  <p>If I run this code, it works fine. John and Smith are displayed  on the labels. </p>
  
  <p>Now for my question. Say instead of first and last name the labels (buttons, menu items, etc.) were actually words that would be different in different languages. What I would like is to have something like</p>
  
  <p>EnglishText.resx
  SpanishText.resx
  GermanText.resx</p>
  
  <p>Each resource file would contain the same names, just different values. Depending on what language was selected, decided by the user (from a menu), how can I get the matching resource file to be used.</p>
  
  <p>Basically what I want would be</p>
  
  <pre><code>FirstName.Text = My.Resources.&lt;Language Specific Resource File&gt;.lblFirstName
  </code></pre>
  
  <p>Is something like this possible? Is this an acceptable approach? Is there a better way of doing this?</p>
  
  <p>Any tips or advice would be greatly appreciated. I try to check often to see if there are follow up questions or if more information needs to be provided.</p>