Module BabelFish
In: lib/babelfish.rb

Ruby interface to Yahoo! BabelFish translation service.




PROJECT = 'babelfish'   project information
VERSION = '0.0.1'
RELEASE = '2008-12-30'
SUMMARY = 'Ruby interface to Yahoo! BabelFish translation service.'
INSTALL = File.expand_path(File.join(File.dirname(__FILE__), '..'))
SERVICE_URI = URI.parse('')   the URI through which the translation service is accessed
LANGUAGE_NAMES = {}   Provides access to a language‘s name when given a language code.
LANGUAGE_PAIRS = {|h,k| h[k] = }   Provides access to a list of destination language codes when given a source language code. In other words, this hash tells you the possible translations that are supported by the service.
LANGUAGE_CODES = LANGUAGE_PAIRS.keys   A list of possible language codes supported by the service.

Public Class methods

Translates the given input from the given source language into the given destination language.

input_text:the text you want to translate
input_lang_code:the code of the language in which the input text is written
output_lang_code:language code of the result of translation
output_encoding:desired encoding of the result of translation