473,769 Members | 6,831 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

web site globalization solution using .net and xml question

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?
Nov 19 '05 #1
5 1354
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
"JusPassinThrou gh" 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?

Nov 19 '05 #2
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


Nov 19 '05 #3
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
"JusPassinThrou gh" 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

Nov 19 '05 #4
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)

"JusPassinThrou gh" <Ju************ **@discussions. microsoft.com> wrote in
message news:3C******** *************** ***********@mic rosoft.com...
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?

Nov 19 '05 #5
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)

"JusPassinThrou gh" <Ju************ **@discussions. microsoft.com> wrote in
message news:3C******** *************** ***********@mic rosoft.com...
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?

Nov 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
3674
by: Max | last post by:
My client has decided to use the Euro for the entire web site. Is there an easy way to get my ASP.NET app to format currency to Euro instead of US-dollar? Right now it's just reading the server settings, but I'd rather set this say at start up in the global.asax since other web sites running on the server may not share this setting. -Max
3
305
by: Miguel Dias Moura | last post by:
Hello, when i preview an ASP.net web site i am creating to a client Date and Time show as follow: Date: dd-mm-yyyy Time: hh-mm (24 hour clock. Ex: 21:45) Both Date and Time use 2 digits format. Ex: 02-02-2004 and 02:05
11
7250
by: Cor Ligthert | last post by:
Hello everybody, Jay and Herfried are telling me every time when I use CDate that using the datetime.parseexact is always the best way to do String to datetime conversions. They don't tell why only that I have to listen to them because they know it better. They told also that in a business situation it is better to use datetime.parseexact for changing cultures and not to use the globalization setting. I did not give them this sample,...
0
1006
by: RKT | last post by:
I've browsed the docs and posts on this topic. There seems to be a lot of opinions. Can someone point me in the most current best-practices direction, considering the requirements below? - Want to support multiple languages on website, maybe using a combobox at top of page to select the language (or browser lang setting) if that is *still* appropriate using .NET globalization facilities. - Want to bind various controls, like...
3
13422
by: shawn | last post by:
I am having a hard time finding an easy way to remove a reference to another .net project that I am no longer using (ASP 2.0 - this was an available option in 1.0). Other projects have a list of references that I can simply look at and delete a reference- with web projects, this does not seem to be the case. Thanks in advance....
4
2815
by: =?Utf-8?B?U3VzaGlTZWFu?= | last post by:
I have question about how create solution file for exist project? So I open vs2005, File->Open web site and select dir with my site. So this site loaded but it doesn't have solution. How I can create solution file for this opened site?
2
4658
by: Aussie Rules | last post by:
Hi, I have a site that Iwant to either display my text in english or french, based on the users prefernces ? I am new to webforms, but I know in winforms, this is pretty easy with a resource file. What is the best way to acheive this with webforms ?
3
4470
by: jobs | last post by:
I have an English site I need to make available in Spanish. Ideally there will be a preset switch in the users profile to indicate they would like to see the site in Spanish. My first inclination is to make a copy of the site redirect them after the login. Outside of doing it this way, or purchasing/using third party products or controls that deal with localization and maybe use xml to drive those controls dynamically. Is their an...
4
2241
by: Mr. X. | last post by:
I have a problem showing hebrew on my site. Please, help. Here is the code : web.config ======= <configuration> <system.web> <customErrors mode="Off"/>
0
9424
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10223
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10051
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9866
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8879
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3571
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.