In the Configuration section of the code, you can change the language From and language To settings. When viewing a single friendfeed entry, near the upper right corner by "Tools", the the link to perform the translation will appear (e.g. Translate Farsi to English). Tested/compatible with Firefox and Safari.
- Micah Wittman
yay! I've been asking about this for a few weeks. I will use firefox for FF for a while so I can use all of your scripts. edit: I usually use chrome
- metalerik
Well done Micah! Installing and taking it for a spin now. Thank you.
- Brian Daniel Eisenberg
@micah Just wanted to let you know that the permanent home site is giving the "The site's security certificate is not trusted!" message in Chrome 3.0.189.0
- metalerik
metalerik, thanks for letting me know. I removed the secure protocol in the above link - it got there by mistake. I only pay the piper for one signed SSL certificate, and it's on a different domain, so that's why you got the warning.
- Micah Wittman
Thank you, Brian. Let me know how you fare with it.
- Micah Wittman
Here's a recent post about people wanting a language filter where I wish for a translation button (did I mention yay!) http://friendfeed.com/friendf... I just went back there to link to this post. Hope that's cool.
- metalerik
Thanks, Micah, Awesome of you to invest the time to enable this. I am personally appreciative and I have friends that will also be, I am quite sure. :) I hope to eventually share the messages I have received as a result of signalling others efforts.
- Eric Logan
Eric, your words are very much appreciated, Eric. I hope this helps people understand each other, even if only just a tad more.
- Micah Wittman
Micah sorry to be gushing but I think this is huge. I mean really huge.
- metalerik
are you not seeing the translate link?
- metalerik
metalerik, re. linking to the post - absolutely ok (you probably saw I commented over there already too). Thanks for the feedback :)
- Micah Wittman
ok cool. I was just messing around and tried to get the from to work with "auto" vs. "fa" or whatever. I wonder why it doesn't work. Do you know?
- metalerik
I was planning to experiment with auto language detect in the next update to two. Let me look something for a second.
- Micah Wittman
metalerik, just set var languageCodeFrom = ''; (empty string) - wow, that's all it takes to get auto-detect working, and the first post I tried just now with Farsi in it worked! http://friendfeed.com/infinit...
- Micah Wittman
UPDATE RELEASE [v0.1.2] - Added auto-language detection handling (in Configuration, you can set an explicit language with var languageCodeFrom; the default is set to auto-detect). Also added an autoTranslate option in Configuration. To automatically translate title/comments when a single entry page is loaded, set var autoTranslateEnabled = true;
- Micah Wittman
No problem, K.D. This feels like the most important user script I've worked on. I hope everyone who needs it can find it :)
- Micah Wittman
thank you again, I'll share this script to other groups, the auto-detection is unbelievable cool!!
- K.D.
This is probably great, and this is going to sound like a stupid question. How do I make this work? View a single entry? How do you do that?
- Gilbert Harding
You win once again Micah! Another great script. Thanks for all the time you pour into making things easier for everyone. :)
- Simon Wicks
@Gilbert: To view a single entry click the text that says when the post was posted (e.g. "4 hours ago" or "5 seconds ago")
- Mark H
Also... awesome script. Feels like the world just got a little bit smaller.
- Mark H
Mark: Thank you, something else I have learnt today.
- Gilbert Harding
Micah - This IS the most important script I've seen in a long long time and the sole reason for me to reinstall Greasemonkey on Firefox. Mad props to you.
- Brian Daniel Eisenberg
It would be nice to have this built into FriendFeed. Any possibility of that happening?
- Brian Sullivan
Brian, hold on, let me pickup the the red phone in the Commissioner's office ;)
- Micah Wittman
FOR ALL AVAILABLE GOOGLE TRANSLATION API SUPPORTED LANGUAGES SEE CODES HERE: http://code.google.com/apis... - Then in the script's Configuration section, change var languageCodeTo = 'en' to whatever code matches the language you want a post translated TO.
- Micah Wittman
This is great, Micah... I've been mystified why that last piece is always missing... the auto-translate from languages you don't understand. This really should be built into the low-levels of twitter, friendfeed, etc., so that static stuff is translated once and shared if poss., the dynamic stuff just cache invalidates any translations.... or something like that.
- Richard pancakhaus Walker
This is one of my favourite auto-detect translated pages so far: http://friendfeed.com/lovepho... - man, even as rough as programmatic translations are today, it really helps open up inaccessible worlds :)
- Micah Wittman
Another fun thing I learned in translation today: "what in English is called the bungee cords, but in Russian formerly known as espanderom"[translation] http://friendfeed.com/spb...
- Micah Wittman
UPDATE RELEASE [v0.1.3] - No new features in this one. Minor code cleanup. Reference copy of Google language codes added to Configuration section.
- Micah Wittman
That looks like..Scotty, beam me up shit
- Chris Harris
Micah: you might have a use for the JS script in one of my projects: http://www.donationcoder.com/Forums... My friend Krishean did the script for it (the same guy that did the dragable bookmarklet hack). I have another version from him that I haven't compiled yet, that self-updates the language list, so I won't have to release a new version if Google decides to add new languages.
- April Russo (app103)
Thanks again, April. I'll check it out asap.
- Micah Wittman
SCRIPT UPDATE [v0.1.5] - Added autoProtocolMatchingEnabled and onlyUseSecureProtocolCompatibleFeatures Configuration options. Now a secure protocol (https) for the current page is detected and all script references will be set to https in that case. Since userscripts.org does not support https, the onlyUseSecureProtocolCompatibleFeatures options controls whether to use that feature (which connects with http) or not. ~~~ As requested here: http://friendfeed.com/baiyssy...
- Micah Wittman
SCRIPT UPDATE [v0.1.6] - Fix to v0.1.5 so that onlyUseSecureProtocolCompatibleFeatures only prevents feature use if a secure connection is present.
- Micah Wittman
Great work. But I found one issue that after the translation, some links are converted to plain text that no longer work.
- Yinfei Zhang
That's a good point, Yinfei. I'll see what I can do for a future release. For now, if you go into single post view (click timestamp) you will see the original html which should always have the working links. Thank you for the feedback - I really appreciate it.
- Micah Wittman
Install page now has "Alternate configuration (keepOriginalTextInRealtime ON)" for user script and bookmarklet language versions http://wittman.org/project...
- Micah Wittman