Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > web site globalization solution using .net and xml question

Reply
Thread Tools

web site globalization solution using .net and xml question

 
 
=?Utf-8?B?SnVzUGFzc2luVGhyb3VnaA==?=
Guest
Posts: n/a
 
      07-15-2005
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?
 
Reply With Quote
 
 
 
 
=?Utf-8?B?c29jaWV0b3BpYS5uZXQ=?=
Guest
Posts: n/a
 
      07-15-2005
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/de...mscontrols.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?

 
Reply With Quote
 
 
 
 
=?Utf-8?B?SnVzUGFzc2luVGhyb3VnaA==?=
Guest
Posts: n/a
 
      07-15-2005
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/de...mscontrols.asp
>
> ---
> www.societopia.net


 
Reply With Quote
 
=?Utf-8?B?c29jaWV0b3BpYS5uZXQ=?=
Guest
Posts: n/a
 
      07-15-2005
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/de...mscontrols.asp
> >
> > ---
> > www.societopia.net

>

 
Reply With Quote
 
Bruce Barker
Guest
Posts: n/a
 
      07-15-2005
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" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
>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?



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
List of free web site design, web site backgrounds, web site layoutsresources cyber XML 1 12-25-2007 11:48 PM
Free web site design, web site backgrounds, web site layoutsresources cyber HTML 0 12-24-2007 04:26 PM
List of free web site design, web site backgrounds, web site layoutsresources cyber HTML 0 12-21-2007 03:47 PM
List of free web site design, web site backgrounds, web site layoutsweb sites cyber HTML 1 12-19-2007 09:07 AM
Integration of globalization data in Python web frameworks GinTon Python 1 10-20-2006 01:04 PM



Advertisments