wijourdil / php-simple-furiganizer
There is no license information available for the latest version (1.0.0) of this package.
A simple PHP package to generate japanese text with furigana for a given word and reading.
1.0.0
2024-05-23 12:42 UTC
Requires
- php: ^8.3
- thecodingmachine/safe: ^2.5
Requires (Dev)
- phpstan/phpstan: ^1.11
- phpstan/phpstan-webmozart-assert: ^1.2
- phpunit/phpunit: ^11.1
- thecodingmachine/phpstan-safe-rule: ^1.2
README
This package is a simple tool to generate japanese text with furigana for a given word and reading.
+ ⇒
Installation
Install the package via composer:
composer require wijourdil/php-simple-furiganizer
Usage
First, simply import the Furiganizer
class:
use Wijourdil\PhpSimpleFuriganizer\Furiganizer;
Then, you just have to instantiate a new Furiganizer and generate the output in the format you want:
$furiganizer = new Furiganizer('雨の日', 'あめのひ'); echo "Output in text is " . $furiganizer->toBrackets(); echo "Output in HTML is " . $furiganizer->toHtml();
Will output :
Output in text is 雨[あめ]の 日[ひ] Output in HTML is