title: Please help me create querystrings in the URLs for my languages! Complete codes included
body: <p>I somehow managed to make my company's website in 9 languages, using Visual Studio 2010 / VB / ASP.NET 4.0.  I believe I'm using sessions.  But you can tell for sure if you see the code provided below.  I know this message is long, but I really need help.</p>
  
  <p>It's a multilingual site, and I managed to put flags on the homepage. When I click a flag, the page's text changes to that language. When you click the French flag, it gets the information from the "FR" .resx resource file in my apps_GlobalResources folder. It stays on that language for the end-user's entire session.  Great! Well, not so great. </p>
  
  <p>The URL, for instance, <strong>about.aspx, remains about.aspx</strong>. Granted, the text changes to French, but I've been told that it's recommended to make it look like, if the client chooses French, for example, <strong>domain.com/about.aspx?lang=FR</strong></p>
  
  <p>But I have NO idea how to do this. If anybody can guide me clearly in the right direction, it'd be <strong>sincerely</strong> appreciated!!!</p>
  
  <p>(<em>For reference, if anybody is kind enough to delve into this issue, which may be a simple one, all of my files I've used in this are included below -- and they're kinda lengthy</em>)</p>
  
  <p>----Homepage.master (how I'm calling the languages -- just 2 samples)--</p>
  
  <pre><code>  &lt;asp:LinkButton ID="LinkButton6" runat="server"
    CommandArgument="de" OnClick="RequestLanguageChange_Click"
    class="flagbutton"&gt;      
    &lt;asp:Image ID="Image7" runat="server" ImageUrl="~/images/flagde.png"
    tooltip="View this website in Deutsch" title="View this website in Deutsch"/&gt;
    &lt;img class="map" src="images/flaghoverde.png" alt=""/&gt;
    &lt;/asp:LinkButton&gt;
  
    &lt;asp:LinkButton ID="LinkButton5" runat="server"
    CommandArgument="fr" OnClick="RequestLanguageChange_Click"
    class="flagbutton"&gt;      
    &lt;asp:Image ID="Image6" runat="server" ImageUrl="~/images/flagfr.png"
    tooltip="Voir ce site en français" title="Voir ce site en français"/&gt;
    &lt;img class="map" src="images/flaghoverfr.png" alt=""/&gt;
    &lt;/asp:LinkButton&gt;
  </code></pre>
  
  <p>---------------code behind homepage.master.vb---------------------</p>
  
  <pre><code>     Partial Public Class Homepage
      Inherits System.Web.UI.MasterPage
      Protected Sub Page_Load(sender As Object, e As EventArgs)
      End Sub
  
       Protected Sub RequestLanguageChange_Click(sender As Object, e As EventArgs)
      Dim senderLink As LinkButton = TryCast(sender, LinkButton)
  
      'store requested language as new culture in the session
      Session(Udev.MasterPageWithLocalization.Classes.Global.SESSION_KEY_CULTURE) = 
      senderLink.CommandArgument
  
      'reload last requested page with new culture
      Server.Transfer(Request.Path)
     End Sub
     End Class
  </code></pre>
  
  <p>---------------------BasePage.vb in App_Code folder--------------------</p>
  
  <pre><code>  Imports Microsoft.VisualBasic
    Imports System
    Imports System.Data
    Imports System.Configuration
    Imports System.Globalization
    Imports System.Threading
    Imports System.Web
    Imports System.Web.Security
    Imports System.Web.UI
    Imports System.Web.UI.WebControls
    Imports System.Web.UI.WebControls.WebParts
    Imports System.Web.UI.HtmlControls
  
    Namespace Udev.MasterPageWithLocalization.Classes
  ''' &lt;summary&gt;
  ''' Custom base page used for all web forms.
  ''' &lt;/summary&gt;
  Public Class BasePage
      Inherits Page
      Protected Overrides Sub InitializeCulture()
          'retrieve culture information from session
          Dim culture__1 As String =  
               Convert.ToString(Session([Global].SESSION_KEY_CULTURE))
  
          'check whether a culture is stored in the session
          If culture__1.Length &gt; 0 Then
              Culture = culture__1
          End If
  
          'set culture to current thread
          Thread.CurrentThread.CurrentCulture =  
          CultureInfo.CreateSpecificCulture(culture__1)
          Thread.CurrentThread.CurrentUICulture = New CultureInfo(culture__1)
  
          'call base class
          MyBase.InitializeCulture()
      End Sub
     End Class
    End Namespace
  </code></pre>
  
  <p>----------------------Culture.vb in App_Code folder--------------------</p>
  
  <pre><code>  Imports Microsoft.VisualBasic
    Imports System
    Imports System.Data
    Imports System.Configuration
    Imports System.Web
    Imports System.Web.Security
    Imports System.Web.UI
    Imports System.Web.UI.WebControls
    Imports System.Web.UI.WebControls.WebParts
    Imports System.Web.UI.HtmlControls
  
    Namespace Udev.MasterPageWithLocalization.Classes
  ''' &lt;summary&gt;
  ''' This class provides ISO definitions for all cultures that are supported by this      
   application.
  ''' &lt;/summary&gt;
  Public Structure Culture
      'German - Switzerland definition
      Public Const DE As String = "de"
      'English - Great Britain definition
      Public Const EN As String = "en"
       End Structure
    End Namespace
  </code></pre>
  
  <p>------------------Global.vb in App_Code folder------------------------</p>
  
  <pre><code>  Imports System
    Imports System.Data
    Imports System.Configuration
    Imports System.Web
    Imports System.Web.Security
    Imports System.Web.UI
    Imports System.Web.UI.WebControls
    Imports System.Web.UI.WebControls.WebParts
    Imports System.Web.UI.HtmlControls
  
    Namespace Udev.MasterPageWithLocalization.Classes
  ''' &lt;summary&gt;
  ''' Summary description for Global
  ''' &lt;/summary&gt;
  Public Structure [Global]
      Public Const SESSION_KEY_CULTURE As String = "culture"
      End Structure
    End Namespace
  </code></pre>