How to have flags representing languages so the client can click a flag and set language? RRS feed

  • Question

  • User558203916 posted

    Hello!  I'm NOT a programmer, and I'm not too intelligent, but I somehow managed to use Visual Studio 2010 to make a company website / asp.net 4.0 / vb.  I also, with the help of this forum and MSDN tutorials, used implicit and explicit localization to create 6 different languages in app_globalresources and app_localresources directories.  I have an resx editor, too, so I'm trying!

    I have the UIculture and culture set to "auto" in my top line thing of each page, and the languages work fine.  When I change the browser preferences on IE to another language, it adopts that language and works fine.  All languages work great!  But let's say the end-user is at a library, or a corporate office, and their web browser isn't set to a preference.

    I want the end user to click a flag and be able to select the language of the page on their own, and I like when websites have little flags, so I wanna try it that way.  So far, I have made it nowhere.  All I've done is saved the 6 flag images  20 x 20 pixels to my images directory and that's it!  Can anybody here guide me in the right direction?


    Jason Weber

    Saturday, January 21, 2012 5:40 AM


  • User558203916 posted

    I managed to solve this problem with the help of a nice guy named Nuux, and along with his expertise, some research on the web.  The short answer is that I created a vb class called BasePage.vb and set all the inherits in all my pages to BasePage instead of system.ui or whatever was there.  Then there's some code behind on the master page, and a form, and everything tied in perfectly.  I have flags and by clicking the flag, you create a session, and that language will be with you through the entire session.  If anybody would like a more detailed response, since it's too long to post in here, I'm open to all emails (in my profile).  Please feel free and I'll share anytime.

    Jason Weber

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 23, 2012 5:38 PM