> output stream of a cf file. Let me explain:
>
> I'm writing an extension to our website to publish it into
> multiple languages. This is a dynamic site with content often
> provided by users.
>
> The solution we came up with was this:
>
> read the contents of the output buffer in the
> onRequestEnd.cfm and write it to a file somewhere on the webroot...
> call a translation service with cfhttp and point it to that
> file I just created...
> this cfhttp call will return a translated version of that
> page in the filecontent variable...
> reset the content of the page: <cfcontent reset=true> output
> the translated code.
>
> The only piece I'm having trouble with is reading in the
> output stream. I cannot use cfsavecontent to wrap each page
> because we have thousands of pages, and it would be a pain in
> the arse to wrap each one. I think the best way to do this is
> by reading the output stream.
As Barney pointed out, this is probably a really bad idea - you're much
better off doing the translation at the front-end, when you enter content,
than by doing something like this.
That said, you can probably do this completely within CF, by throwing an
error, catching the error, and capturing the GeneratedContent. But again,
yecch.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
phone: 202-797-5496
fax: 202-797-5444
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

