Translation Strategies

2009-10-24 Thread Anthony Webb

I've got a mid-sized site a client needs to have translated into a few 
languages.  They do not want to use a web service (like google) for this.  They 
would like to have more control over the output.

The content is partially in html on the pages, and partially in the database as 
well (a little e-commerce in addition to the standard aboutus/corp info) Images 
contain text to but this is another issue.

So I started down the path of creating separate views for each language each in 
their own language folder.  Then I set a session var of  the currently selected 
language and put that right in the include statement for my view.  Works great 
for the html/image stuff. 

What I am trying to figure out is the best way to handle the DB driven stuff.  
Just create new tables or fields that contain the translated text?

Another strategy that I thought about was to store translations in the 
application scope.  Create a common function that would take a string of text 
and a language identifier.  If it found a mapping in the app scope for that 
string and the language requested it would return the translated text and write 
it to a log to notify a translator (person) that something needed to be added 
to the map.  If not it would simply return the string untranslated.  Benefits 
of this approach would be that one single view could service any number of 
languages, and it would work with the stuff coming from the DB as well.  The 
downside to this approach might be efficiency (how much data can you really 
store effectively in the app scope?) 

Any other ideas or feedback out there? 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327655
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


CFHTTP post modifying strings on form post? CF vs PHP

2009-06-18 Thread Anthony Webb

I have a CF page with this:
cfhttp method=POST url=http://test.local/test.php;
cfhttpparam type=formField name=msg value=I \ am
/cfhttp
cfoutput#cfhttp.filecontent#/cfoutput

And a PHP receiving page:
you said: ?php
echo $_POST['msg'];
?

The output of the CFML page is:
you said: I \\ am

So, who is responsible for the extra backslash in the output?  Is it cfhttp or 
is it php, and why? Other characters like quotes and such are also being 
escaped.

Note that if you post to a CFML page then there isnt any extra backslash in the 
output. 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323643
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: CFHTTP post modifying strings on form post? CF vs PHP

2009-06-18 Thread Anthony Webb

The wireshark dump confirmed that it WAS NOT cfhttp doing this, but rather a 
feature of php called magic quotes

More info posted here:
http://help.imified.com/faqs/building-imified-bots/backslashses-are-inserted-before-certain-characters-when-my-bot-replies

 I have a CF page with this:
 cfhttp method=POST url=http://test.local/test.php;
 cfhttpparam type=formField name=msg value=I \ am
 /cfhttp
 cfoutput#cfhttp.filecontent#/cfoutput
 
 And a PHP receiving page:
 you said: ?php
 echo $_POST['msg'];
 ?
 
 The output of the CFML page is:
 you said: I \\ am
 
 So, who is responsible for the extra backslash in the output?  Is it 
 cfhttp or is it php, and why? Other characters like quotes and such 
 are also being escaped.
 
 Note that if you post to a CFML page then there isnt any extra 
 backslash in the output. 


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323647
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


compatible providers?

2008-07-17 Thread Anthony Webb
Has anyone out there actually used the SMS gateway in CF?  If so, which 
provider did you use?  I hear talk about compatible providers but have never 
actually know someone who had a provider that integrated well with CF.  We 
ended up writing our own wrapper for our providers API.  But a nice slick 
direct integration would be nice.  Anyone out there using anyone in particular? 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309260
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Extract text from webpage content using cfhttp

2008-07-09 Thread Anthony Webb
I need to index web page contents for doing verity (or similar) searching.  I'd 
like to insert just the text that a web page returns and not any of the other 
stuff (like html, JS, CSS, images, etc)  

I noticed that cfhttp.filecontent returns the entire contents of the page, 
anyone have a good way to get at just the text?

Also, I am storing the results in a mysql database and was anticipating using 
the text data type, I assume that is the best way to go? 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308820
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Extract text from webpage content using cfhttp

2008-07-09 Thread Anthony Webb
Thanks for the tip I will have a look at doing this using some regex.

I did find this excellent sud tutorial on extracting text for indexing from 
html.  I really wish there was something equivalent in a nice cfc, because 
there is ton here that I really never considered.

http://nadeausoftware.com/articles/2008/04/php_tip_how_extract_keywords_web_page
 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308823
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Extract text from webpage content using cfhttp

2008-07-09 Thread Anthony Webb
I'm not so set on extracting specific elements from a page, more about indexing 
all the actual text on a page to index and show our users pages like their 
search term.  Search engines do this extraction and analysis on web pages. 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308824
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Facebook apps wont run on CF8

2007-09-20 Thread Anthony Webb
Hi all, been banging my head against the wall getting a simple hello world 
app running on CF8.  Apparently there is some issues with the form field 
validator in CF8?  

At any rate more details are here: 
http://www.facebook.com/topic.php?uid=2205007948topic=9278post=69186#post69186

Looks like it is bombing on like 137 of FieldValidator.java with some sort of a 
null pointer exception.

Has anyone come up with a work around for this issue?  With the recent surge in 
facebook apps it would be nice to be able to hold up CF and show people how 
simple facebook development in CF can be, so far it has been anything but...

At any rate it does seem as though this is a new problem introduced in CF8 
because the app runs fine when hosted from CF7.

Any ideas?



~|
ColdFusion 8 - Build next generation apps
today, with easy PDF and Ajax features - download now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:289050
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Server side form validation amp; CF8

2007-09-20 Thread Anthony Webb
Looks to me like the problem is that it is trying to validate the element that 
you deleted when you inserted the new item with _CFFIX appended.

cf8 must be doing form validation by looping over the fieldnames instead of the 
form structure itself, and when you delete elements from the structure, the 
whole null pointer exception occurs

Now, if that indeed is the problem... how to fix it?

-Anthony 

~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:289056
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Server side form validation amp; CF8

2007-09-20 Thread Anthony Webb
I tried changing form.fieldnames and replacing the old fieldnames with the new 
ones on the whim that maybe it was looping over that list for validation, but 
that did not do anything.  It is referencing that element of the form some 
other way.

Is anyone aware of how to just disable form validation in cf8?  Is that even 
possible? 

~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:289057
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: database table watcher gateway and task queue

2007-09-09 Thread Anthony Webb
Seems like this would work, I must say I've seen uglier hacks in my day...

Any other ideas out there?   FYI I am running mySQL 5.

Thanks for the tips!


~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:288055
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


database table watcher gateway and task queue

2007-09-08 Thread Anthony Webb
CF ships with the directory watcher gateway which is pretty cool. Saves from 
having to set those scheduled tasks for every 5 min watching for changes in a 
directory.
 
I have had need lately to do that same thing on a DB table. A sort of queue 
system where I will write records to a DB table, then CF can work on those 
items deleting them as they are complete. Of course I could schedule a task to 
check the DB table periodically. But I am wondering if you know of or had any 
experience with some sort of a table watcher event gateway.
 
Is there a better way to do what I want to implement a queue of tasks? The 
example case would be someone sending via my API a large list of notifications 
to be send (each requiring a subsequent http call).  Rather than making the 
user wait for each call to me made, he simply hands off the list to my queue 
and then gets a response that we are working on the list.

Thanks Guys.

_
Gear up for Halo® 3 with free downloads and an exclusive offer. It’s our way of 
saying thanks for using Windows Live™.
http://gethalo3gear.com?ocid=SeptemberWLHalo3_WLHMTxt_2

~|
Get involved in the latest ColdFusion discussions, product
development sharing, and articles on the Adobe Labs wiki.
http://labs/adobe.com/wiki/index.php/ColdFusion_8

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:288036
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: database table watcher gateway and task queue

2007-09-08 Thread Anthony Webb
Something like a trigger would be perfect.  But the thing is I need to do some 
stuff that is not DB related (like send a message, etc).  Can the trigger call 
a cfc or do an http call to some cfm?  Can a stored proc call that?  I've 
usually had my cfm calling stored procs not vice versa.  Interesting thought.

How about a database trigger which calls a stored procedure to do that 
processing?


~|
ColdFusion 8 - Build next generation apps
today, with easy PDF and Ajax features - download now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:288045
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4