PHP code example of jurchiks / numbers2words_twig

1. Go to this page and download the library: Download jurchiks/numbers2words_twig 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/ */

    

jurchiks / numbers2words_twig example snippets


use \Twig\Environment;
use \js\tools\numbers2words\Speller;
use \js\tools\numbers2words\twig\SpellerExtension;

$extension = new SpellerExtension(Speller::LANGUAGE_ENGLISH, Speller::CURRENCY_EURO);
$extension->
yaml
services:
    js\tools\numbers2words\twig\SpellerExtension:
        tags: [twig.extension]
        arguments: ['en', 'EUR']
        properties: # optional