PHP code example of bocanhcam / nova-japanese-transformer

1. Go to this page and download the library: Download bocanhcam/nova-japanese-transformer 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/ */

    

bocanhcam / nova-japanese-transformer example snippets


use Bocanhcam\NovaJapaneseTransformer\JapaneseTransformerText;
use Bocanhcam\NovaJapaneseTransformer\JapaneseTransformerTextarea;

// Text
JapaneseTransformerText::make('Name'), // Convert Romaji to Kana. outputs Hiragana by default; uppercase text outputs Katakana.
JapaneseTransformerText::make('Hiragana')->toHiragana(), // Convert Katakana or Romaji to Hiragana.
JapaneseTransformerText::make('Katakana')->toKatakana(), // Convert Hiragana or Romaji to Katakana.
// Textarea
JapaneseTransformerTextarea::make('Description'), // Have the same function like Text field