ApertiumWebService Class Reference
[Translation Web Services]

Implements support Apetrium translator api. More...

Inheritance diagram for ApertiumWebService:
Inheritance graph
[legend]
Collaboration diagram for ApertiumWebService:
Collaboration graph
[legend]

List of all members.

Protected Member Functions

 mapCode ($code)
 Map a MediaWiki (almost standard) language code to the code used by the translation service.
 doPairs ()
 Get the list of supported language pairs for the web service.
 doRequest ($text, $from, $to)
 Get the suggestion.

Detailed Description

Implements support Apetrium translator api.

See also:
http://wiki.apertium.org/wiki/Apertium_web_service
Since:
2013-01-01

Definition at line 17 of file ApertiumWebService.php.


Member Function Documentation

ApertiumWebService::doPairs (  )  [protected]

Get the list of supported language pairs for the web service.

The codes should be the ones used by the service. Caching is handled by the public getSupportedLanguagePairs.

Returns:
array $list[source language][target language] = true

Reimplemented from TranslationWebService.

Definition at line 22 of file ApertiumWebService.php.

ApertiumWebService::doRequest ( text,
from,
to 
) [protected]

Get the suggestion.

See getSuggestions for the public method.

Parameters:
string $text Text to translate.
string $from Language code of the text, as used by the service.
string $to Language code of the translation, as used by the service.
Returns:
string Translation suggestion.

Reimplemented from TranslationWebService.

Definition at line 41 of file ApertiumWebService.php.

Here is the call graph for this function:

ApertiumWebService::mapCode ( code  )  [protected]

Map a MediaWiki (almost standard) language code to the code used by the translation service.

Parameters:
string $code MediaWiki language code.
Returns:
string Translation service language code.

Reimplemented from TranslationWebService.

Definition at line 18 of file ApertiumWebService.php.


The documentation for this class was generated from the following file:
Generated on Tue Oct 29 00:00:40 2013 for MediaWiki Translate Extension by  doxygen 1.6.3