| |
| ||||||
Roland Bouman's blog goes i18n (Powered by Google Translate)This is a discussion on Roland Bouman's blog goes i18n (Powered by Google Translate) within the DWH Tip Feeds forums, part of the Data Warehousing Tips and Techniques category; Now that Pentaho Solutions is in print, and the first few copies are finding its way towards the readers, I felt like doing something completely unrelated. So, I hacked up ... |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
| | #1 |
| News Bot Join Date: Nov 2007
Posts: 15,067
![]() | Now that Pentaho Solutions is in print, and the first few copies are finding its way towards the readers, I felt like doing something completely unrelated. So, I hacked up a little page translation widget, based on the Google Language API. You can see the result in the top of the left sidebar of my blog right now: ![]() Using it is very simple: just pick the language of choice, and the page (text and some attributes like alt and title) will be translated. Pick the first entry in the list to see the original language again. This all happens inline by dynamic DOM manipulation, without having to reload the page. I tested it on Chrome 2, Firefox 3.5, Opera 10, Safari 4 and Internet Explorer 6 and 8. So far, it seems to work for all these browsers. Personally, I feel that the user experience you get with this widget is superior to what you would get with the google translation gadget. In addition, it is pretty easy to to configure the Translator class . The code to add this to your page is in my opinion reasonably simple: This really is all the code you need - there are no dependencies on external Javascript frameworks. If you don't need or like the gui, you can of course skip the gui placeholder code as well as the second script and interract with the Translator object programmatically. The minified javascript file is about 7k, which is not too bad in my opinion. I haven't worried too much about optimizations, and I think it should be possible to cut down on codesize. Another thing I haven't focused on just now is integration with frameworks - on the contrary I made sure you can use it standalone. But in order to do that, I had to write a few methods to facilitate DOM manipulation and JSON parsing, and its almost certain you will find functions like that are already in your framework. Anyway, readers, I'd like to hear from you...is this auseful feature on this blog? Would you like to use it on your own blog? If there's enough people that want it, I will make it available on google code or something like that. More from Roland Bouman's Blog ... |
| | |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Anatomy of a blog hack | admin | Prediction Markets News Feeds | 0 | 19th November 2009 02:37 PM |
| Google Local: Get stats on how many people search for your business on Google Maps | admin | Presentation News Feeds | 0 | 19th November 2009 10:18 AM |
| Numerix & CDO Software Partner to offer ?Numerix Powered? Solutions for CDO Tool Suit | Latest News Headlines | 2009 Q4 News Headlines | 0 | 27th October 2009 10:02 PM |
| Accelrys Launches Blog for Scientific and Engineering Research Community | Steve Bennett | Other International Vendors | 0 | 27th August 2009 06:29 PM |
| New CORTEX Blog | Steve Bennett | Developing a BI Strategy | 0 | 14th October 2007 05:29 PM |
| | |
| | |