web site globalization solution using .net and xml question

G

Guest

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?
 
G

Guest

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
 
G

Guest

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.
 
G

Guest

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.
 
B

Bruce Barker

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)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top