locked
Login control on MasterPage easiest method for localisation? RRS feed

  • Question

  • User571423777 posted

    I have a login control on a MasterPage.
    I wish for my site to be available in English and French.
    Therefore I need "Username" and "Password" etc etc to be available in both languages.
    I wish the application to detect the client's browser's language and display the respective text.

    What would be the easiest and/or best method for doing this?

    Many thanks for your help

    Graham

     

    Thursday, February 22, 2007 6:47 PM

Answers

  • User764555827 posted

    Hi Graham, 

    Well, it couldn't be easier! Visual Studio 2005 partly automatizes this creation. Jst switch to Design mode ("Display/Design" menu) and clic the "Tools/Generate local resource" menu. Then copy the generated resx file and translate. That's it!

    More info in this tutorial that's exacltly suited to your needs:  Translating an ASP.net Web application.

    Hope this helps,

    Arnaud 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 22, 2007 7:34 PM

All replies

  • User764555827 posted

    Hi Graham, 

    Well, it couldn't be easier! Visual Studio 2005 partly automatizes this creation. Jst switch to Design mode ("Display/Design" menu) and clic the "Tools/Generate local resource" menu. Then copy the generated resx file and translate. That's it!

    More info in this tutorial that's exacltly suited to your needs:  Translating an ASP.net Web application.

    Hope this helps,

    Arnaud 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 22, 2007 7:34 PM
  • User571423777 posted

    Thank you aweil.

    I also wish to have a web.sitemap so I can have a Menu control and a SiteMapPath.

    The web.sitemap is a "hard" XML file so how can I localise the Menu and SiteMapPath please?

    Thanks again,

    Graham

     

    Friday, February 23, 2007 3:56 AM
  • User-1696021186 posted

    The web.sitemap is a "hard" XML file so how can I localise the Menu and SiteMapPath please?

    http://forums.asp.net/thread/1591518.aspx

    Friday, February 23, 2007 6:46 AM
  • User571423777 posted

    Thank you for your time and support SoftwareService.

    I shall have a good read of that.

    Graham

     

    Friday, February 23, 2007 6:55 AM
  • User764555827 posted

    You're welcome, Graham.

    It may come a little late, but here's a tutorial diving into the details of localizing a Web.sitemap (the link passed above is good but has some pitfalls):  http://dreamdotnet.blogspot.com/2007/02/tutorial-localize-websitemap-file.html

    Thursday, March 1, 2007 7:14 PM
  • User-1696021186 posted

    Bonjour Arnaud,

    what kind of pitfalls?

    Bye
    Alexander

    Friday, March 2, 2007 3:37 AM
  • User571423777 posted
    Thank you very much both of you and no it's never too late for good advice :)
    Friday, March 2, 2007 4:41 AM
  • User764555827 posted

    Huten Tag Alexander,

    Well, not a lot, but I listed two points that are usual traps. Indeed, several developers are used to considering that a web.sitemap's resource file is a local resource ("local" to a file), even though the tutorial you liked to says otherwise. The other trap is about using the much recommended output cache, which will not allow the result to be seen.

    Anyway, the link you sent is very good. 

    Best regards,

    Arnaud 

    Friday, March 2, 2007 5:18 AM