Tom Muck's Blog
News and Views
1 post
on 11/09/2006
Multiple languages in a web site
Thursday, November 09, 2006 11:19:05 PM
The last part of a 3-part series I wrote about building a multi-language site goes live today at Community MX. I've seen different ways of creating data-driven multi-language sites, but the method I used in the series uses an incredibly underused technique involving ColdFusion custom tags. Basically, the technique will turn any simple, well-formed HTML or XHTML page into a content management system with only one tag required on the page. Using <cfimport> you can create custom tags using any name you want -- including the names of HTML tags. What that essentially means is that your h1, h2, h3, p, a, td, th, and any other tag you want to use can become a custom tag with the full power of the ColdFusion language.
Maybe it's been done before, but I devised the system because I'm lazy -- I didn't want to have to rewrite pages and have to type content again. The system actually sucks the current content out of your site and puts it in the database -- and then from that moment on uses the content from the database instead. Also, the fact that you can use ColdFusion code in the custom tags allows you to insert things like administrative links to edit content.
The article series shows the construction of the base custom tag, the custom tags that take the place of the html tags, and the administrative page that allows you to edit and update content in 1 or more languages. The first part was a freebie, and part 2 and part 3 are free for subscribers and a small fee for non-subscribers.
Category tags: Community MX, Dreamweaver, ColdFusion
Posted by Tom Muck
Add comment |
View comments (0) |
Permalink
|
Trackbacks (0)
|
Digg This
1 post
on 11/09/2006
Before posting comments or trackbacks, please read the posting policy.