Tuesday, April 24, 2012

Parse and translate classic ASP & ASP.NET website

I have a site with a bunch of (pretty ugly) classic asp pages, as well as a number of ASP.NET web forms pages. I need to be able to set it up so the user can flip a switch and translate the whole site to French.

Unfortunately, the requesting client does not want us to use something simple like google translate, they want to be in control of the dictionary to prevent errors in grammar, etc. This means I have to overcome two problems.

First, I need to parse out all of the hard coded text on the website that would be visible to the client and put it into a spreadsheet so they can translate it to their liking and send it back. I was trying to use the Html Agility Pack to do this with the classic code, but was having trouble handling cases where there are server tags (which there are an obscene amount of).

Second, I need a solution that will use this dictionary to translate the text, in both classic and ASP.NET.

I'm thinking the dictionary will be in XML, and could do the translation on the client side, so it will not have to deal with the server tags issue and will work in both classic and .NET, but I'm completely open to suggestion. If anyone has any ideas or knows of any kind of solution that will help me with one or both of my problems, I'd greatly appreciate any help. Thanks

No comments:

Post a Comment