Automatic Translation Demo

Does your Web site have a global audience? Do you need to serve pages in different languages but don't want to maintain duplicate sets of files? The MTFilter servlet can help.

MTFilter demonstrates the IBM Machine Translation component and lets you automatically serve English pages in the language of the requesting browser. You can use MTFilter on pages generated by a specific servlet (servlet list filtering), or for all pages with particular MIME types (MIME-based filtering).


 

How to run this sample:

To run this sample and return a servlet response in German, you must set up your browser to request pages in German, install the Machine Translation component, and configure the MTFilter sample.

Follow these steps to translate using servlet list filtering and test the Automatic Translation sample. See the English "Simple JSP Site" become "Einfache JSP Seite" in German!


How this sample works:

The MTFilter servlet recognizes that the requesting browser is German and dynamically translates the output of the servlet using the German dictionary provided in the Machine Translation component.


How to use this sample for your web pages:

Following the steps to translate using servlet list filtering , you can use this method to chain any of your servlets to the MTFilter servlet and translate their output into the supported languages.

You can also use the MTFilter servlet to translate all your served pages using MIME-based filtering. Follow these instructions to translate your pages by MIME type.