locked
Globalizing Static Content of a WebPage RRS feed

  • Question

  • User2067467444 posted
    Hi All This is Lokanatha, from past Several Days i am working on Globalization/Localization. I have a problem of chnaging the Static Content like i am having an Html Client Control , i need to change the text of that Control based on the UserSelected Language/Culture. for the Server Controls I can able to Chnage the Text in the .aspx.cs file by accessing the .resx File but the Problem with Client side Controls & static Text. Example: I have AddUser Page . This Page is Having 5 Server Side Button /Label Control it can be changed to any Language apart from this I am Having some more Clientside Controls i need to Chnage text for these controls. I have only one AddUser.aspx page for all the Languages/Cultures. I dont want to Provide one More AddUser.aspx page to format Static Text of the Web Page. Please suggest Me a better Solution. Thanks&Regards Lokanatha
    Wednesday, October 3, 2007 3:17 AM

Answers

All replies

  • User1642585364 posted

    AFAIK localization is not supported for HTML controls.  Why not replace your static controls with their server-side correspondents, which support localization?

    Wednesday, October 3, 2007 1:08 PM
  • User764555827 posted

    Hi,

    Use server controls like Label to hold your static text, and then have a look at my following tutorials:

    Tutorial: Translating an ASP.net Web application

    Trick: Automated translation of a resx file

    Tutorial: Localize a Web.sitemap file

    Using a resource in an ASP.NET Theme (Tutorial)

    Hope this helps,

    Arnaud

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, October 3, 2007 3:47 PM
  • User710222615 posted

    Hi Lokanatha!

    Try something like this in your aspx file!

    <input id="Button1" type="button" value="<%= Resources.Language.clear %>" />

    I think this will answer your question!

    Regards
    Erlis

    Wednesday, October 3, 2007 4:07 PM
  • User-503940700 posted

    Try something like this in your aspx file!

    <input id="Button1" type="button" value="<%= Resources.Language.clear %>" />

    I think this will answer your question!

     

    I am afraid this wont work unless you use runat="server" tag in your button control.

    Also, refer to this article for localizing your web app:

    http://www.codeproject.com/useritems/localization.asp

    Hope this helps,

    Vivek 

    Thursday, October 4, 2007 2:03 AM
  • User710222615 posted

    Hi vivek_iit!

    Did you tried that?? I use that everywhere in my code! Try first and then tell me! [;)]

    Regards
    Erlis

    Thursday, October 4, 2007 9:53 AM