2017 © Pedro PelĂĄez
 

library wikidiki

WikiDiki lets you translate words (mostly nouns) across multiple languages based on wikipedia.org

image

maciejkrol/wikidiki

WikiDiki lets you translate words (mostly nouns) across multiple languages based on wikipedia.org

  • Monday, July 25, 2016
  • by MaciejKrol
  • Repository
  • 1 Watchers
  • 5 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

WikiDiki

WikiDiki uses Wikipedia to translate words across multiple languages., (*1)

Installation

Total Downloads, (*2)

You can install the library using composer., (*3)

composer require maciejkrol/wikidiki

Basic usage

WikiDiki usage is super simple., (*4)

//instantiate
$wikidiki = new \maciejkrol\wikidiki\wikidiki ();

When translating you must tell WikiDiki what is the base language. English in this case. WikiDiki uses ISO two letter language codes., (*5)

This way you will get all the available translations as an associative array with the language codes as keys., (*6)

$word       =   'Tea';
$language   =   'en';

$translated = $wikidiki->translate($word, $language);   //array

You can also provide a third argument, a string with a single language code to get a single translated string., (*7)

$word       =   'Tea';
$language   =   'en';
$to         =   'pl';

$translated = $wikidiki->translate($word, $language, $to);   //string

or an array to retrieve an array of translations., (*8)

$word       =   'Tea';
$language   =   'en';
$to         =   ['pl', 'it'];

$translated = $wikidiki->translate($word, $language, $to);   //array

In case WikiDiki can't find a translation null will be returned;, (*9)

From now on you can get search suggestions:, (*10)

$word       =   'Tea';
$language   =   'en';

$translated = $wikidiki->suggest($word, $language, $to);   //array

The Versions

25/07 2016

dev-master

9999999-dev

WikiDiki lets you translate words (mostly nouns) across multiple languages based on wikipedia.org

  Sources   Download

MIT

by Maciej KrĂłl

translation wikipedia wikidiki

25/07 2016

1.0.2

1.0.2.0

WikiDiki lets you translate words (mostly nouns) across multiple languages based on wikipedia.org

  Sources   Download

MIT

by Maciej KrĂłl

translation wikipedia wikidiki

19/07 2016

1.0.1

1.0.1.0

WikiDiki lets you translate words (mostly nouns) across multiple languages based on wikipedia.org

  Sources   Download

MIT

by Maciej KrĂłl

translation wikipedia wikidiki

19/07 2016

1.0

1.0.0.0

WikiDiki lets you translate words (mostly nouns) across multiple languages based on wikipedia.org

  Sources   Download

by Maciej KrĂłl

translation wikipedia wikidiki