PHP code example of mbilbille / jpnforphp

1. Go to this page and download the library: Download mbilbille/jpnforphp library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mbilbille / jpnforphp example snippets


  $transliterator = new Transliterator();
  $transliterator->setSystem(new Hepburn());
  $transliterator->transliterate('くるま');

  $entries = InflectorUtils::getEntriesFromDatabase('食べる');
  Inflector::inflect($entries[0]);

  or

  $entry = new Entry();
  $entry->setKanji('食べる');
  $entry->setKana('たべる');
  $entry->setType('v1');
  Inflector::inflect($entry);