PHP Classes

Google WAP Dictionary: Idiom translation interface for mobile devices

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2008-04-15 (7 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 576 All time: 4,987 This week: 1,079Up
Version License PHP version Categories  
wap_dictionary 0.1MIT/X Consortium ...4.1Localization, Wireless and Mobile, We...
Description Author  

This class can be used to provide a Web interface suitable for mobile devices to translate text between idioms.

It generates Web interface in XHTML or WML with a small form to let the user enter text to be translated between two idioms.

The class accesses the Google translate service pages and emulates the submission of the text translation form. The class parses the results and reformats them to display small mobile device screens.

Picture of Vagharshak Tozalakyan
Name: Vagharshak Tozalakyan <contact>
Classes: 28 packages by
Country: Armenia Armenia
Age: 35
All time rank: 61 in Armenia Armenia
Week rank: 47 Down1 in Armenia Armenia Equal
Innovation award
Innovation award
Nominee: 7x


1. Copy "class.GoogleWAPDictionary.php" and "dictionary.php" to some location on
Web server. You may rename "dictionary.php" to anything you want.

2. Open "dictionary.php" in text editor and set parameters at the top of the

$mode = 'xhtml'
Set to xhtml or wml. It is recommended to use wml mode for mobile devices.

$defDictionary = 'en|ru'
Default dictionary. Currently supported dictionaries are:

'en|fr' 	English - French
'fr|en' 	French - English
'en|de' 	English - German
'de|en' 	German - English
'en|it' 	English - Italian
'it|en' 	Italian - English
'en|ko' 	English - Korean
'ko|en' 	Korean - English
'en|es' 	English - Spanish
'es|en' 	Spanish - English
'en|ru' 	English - Russian
'ru|en' 	Russian - English
'en|zh-TW' 	English - Chinese (Traditional)
'zh-TW|en' 	Chinese (Traditional) - English
'en|pt' 	English - Portuguese
'pt|en' 	Portuguese - English

3. Run "dictionary.php" from your browser or mobile device.

Note: You may need to use a mobile device emulator or a WML browser to view WML
output in your PC.

  Files folder image Files  
File Role Description
Plain text file class.GoogleWAPDictionary.php Class Class source
Accessible without login Plain text file dictionary.php Example Sample of usage
Accessible without login Plain text file readme.txt Doc. How to use?

 Version Control Unique User Downloads Download Rankings  
 0%Total:576All time:4,987
 This week:0This week:1,079Up