web site globalization solution using .net and xml question

Discussion in 'ASP .Net' started by =?Utf-8?B?SnVzUGFzc2luVGhyb3VnaA==?=, Jul 15, 2005.

  1. I have a client that has an existing website of about 100 pages. He wants
    those pages translated into 3 different languages. He currently uses a third
    party translation source who suggested that a good solution would be to use
    xml to hold all the text for the site then use xslt to generate a the pages.
    I've attempted to implement this on a page , but the web page loses the
    functionality of the webcontrols rendered through xml & xslt. Basically, i
    can't add any programming to the code-behind of the page b/c the controls
    arent rendered yet. Does anyone know of a vialable to create an .aspx using
    xml & xlst that does not lose the code-behind functionality?
     
    =?Utf-8?B?SnVzUGFzc2luVGhyb3VnaA==?=, Jul 15, 2005
    #1
    1. Advertising

  2. If the Web server controls that you need to put on any page are not affected
    by the choice of language selected by the user, you might separate the
    content from the display by creating a class library that handles the
    xml/xslt transformations and that serves them to the Web server controls in
    your ASP.NET application webforms.

    If the number and layout of Web server controls would be affected by the
    page content then you might have to generate the controls dynamically in the
    code to wire up the events for each control. For examples on dynamically
    creating controls refer to the MSDN library:
    http://msdn.microsoft.com/library/d.../vboricreatingprogrammingwebformscontrols.asp

    ---
    www.societopia.net


    "JusPassinThrough" wrote:

    > I have a client that has an existing website of about 100 pages. He wants
    > those pages translated into 3 different languages. He currently uses a third
    > party translation source who suggested that a good solution would be to use
    > xml to hold all the text for the site then use xslt to generate a the pages.
    > I've attempted to implement this on a page , but the web page loses the
    > functionality of the webcontrols rendered through xml & xslt. Basically, i
    > can't add any programming to the code-behind of the page b/c the controls
    > arent rendered yet. Does anyone know of a vialable to create an .aspx using
    > xml & xlst that does not lose the code-behind functionality?
     
    =?Utf-8?B?c29jaWV0b3BpYS5uZXQ=?=, Jul 15, 2005
    #2
    1. Advertising

  3. I've done the latter of what you suggested. Except all I did was dynamically
    load xml and style it with the xml.Transform class in the code behind. From
    there the xml is tranformed and placed on the page. Within the xslt I add
    web control code to the page. So the web contols added through xslt and xml
    are never instantiated on the page until after the xml is rendered. So I'd
    get an error when referrring to those controls from the code behind b/c they
    aren't physically on the page until after the xml gets rendered by a browser.

    I'm really thinking about trashing the whole idea, yet if i get it to work
    it'll be really useful.

    "societopia.net" wrote:

    > If the Web server controls that you need to put on any page are not affected
    > by the choice of language selected by the user, you might separate the
    > content from the display by creating a class library that handles the
    > xml/xslt transformations and that serves them to the Web server controls in
    > your ASP.NET application webforms.
    >
    > If the number and layout of Web server controls would be affected by the
    > page content then you might have to generate the controls dynamically in the
    > code to wire up the events for each control. For examples on dynamically
    > creating controls refer to the MSDN library:
    > http://msdn.microsoft.com/library/d.../vboricreatingprogrammingwebformscontrols.asp
    >
    > ---
    > www.societopia.net
     
    =?Utf-8?B?SnVzUGFzc2luVGhyb3VnaA==?=, Jul 15, 2005
    #3
  4. As you have realized from your attempt to use xslt, Xslt is a stylesheet
    language technology that is meant primarily to create markup (for data
    presentation and data transformations), but not to dynamically place controls
    on a page and wire up events for them.

    ---
    www.societopia.net


    "JusPassinThrough" wrote:

    > I've done the latter of what you suggested. Except all I did was dynamically
    > load xml and style it with the xml.Transform class in the code behind. From
    > there the xml is tranformed and placed on the page. Within the xslt I add
    > web control code to the page. So the web contols added through xslt and xml
    > are never instantiated on the page until after the xml is rendered. So I'd
    > get an error when referrring to those controls from the code behind b/c they
    > aren't physically on the page until after the xml gets rendered by a browser.
    >
    > I'm really thinking about trashing the whole idea, yet if i get it to work
    > it'll be really useful.
    >
    > "societopia.net" wrote:
    >
    > > If the Web server controls that you need to put on any page are not affected
    > > by the choice of language selected by the user, you might separate the
    > > content from the display by creating a class library that handles the
    > > xml/xslt transformations and that serves them to the Web server controls in
    > > your ASP.NET application webforms.
    > >
    > > If the number and layout of Web server controls would be affected by the
    > > page content then you might have to generate the controls dynamically in the
    > > code to wire up the events for each control. For examples on dynamically
    > > creating controls refer to the MSDN library:
    > > http://msdn.microsoft.com/library/d.../vboricreatingprogrammingwebformscontrols.asp
    > >
    > > ---
    > > www.societopia.net

    >
     
    =?Utf-8?B?c29jaWV0b3BpYS5uZXQ=?=, Jul 15, 2005
    #4
  5. =?Utf-8?B?SnVzUGFzc2luVGhyb3VnaA==?=

    Bruce Barker Guest

    the xlst approach is pretty incompatible with the asp control model. the asp
    control model is to use individual language resource files (those empty
    ..resx file in you project). you can also use binding to get language
    specific values.

    -- bruce (sqlwork.com)



    "JusPassinThrough" <> wrote in
    message news:...
    >I have a client that has an existing website of about 100 pages. He wants
    > those pages translated into 3 different languages. He currently uses a
    > third
    > party translation source who suggested that a good solution would be to
    > use
    > xml to hold all the text for the site then use xslt to generate a the
    > pages.
    > I've attempted to implement this on a page , but the web page loses the
    > functionality of the webcontrols rendered through xml & xslt. Basically, i
    > can't add any programming to the code-behind of the page b/c the controls
    > arent rendered yet. Does anyone know of a vialable to create an .aspx
    > using
    > xml & xlst that does not lose the code-behind functionality?
     
    Bruce Barker, Jul 15, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. fredd00
    Replies:
    2
    Views:
    1,454
    fredd00
    Sep 3, 2005
  2. RKT
    Replies:
    0
    Views:
    435
  3. GinTon
    Replies:
    1
    Views:
    229
    GinTon
    Oct 20, 2006
  4. Basildk
    Replies:
    8
    Views:
    606
    Patrice
    Aug 31, 2007
  5. VR

    Globalization Question

    VR, Jan 22, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    145
Loading...

Share This Page