PHP code example of pnlinh / vietnamese-converter

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

    

pnlinh / vietnamese-converter example snippets




nlinh\VietnameseConverter\VietnameseConverter;

$output = VietnameseConverter::make()
			       ->convert('Tôi tên là Ngô Chí Dũng. Người đã tạo ra cái phần mềm này.');

echo $output; // Toi ten la Ngo Chi Dung. Nguoi da tao ra cai phan mem nay.

- convert($input)
- convert($input, 'unicode', 'virq');
- convert($input, 'unicode', 'vnet');
- convert($input, 'unicode', 'vni');
- convert($input, 'unicode', 'ascii');
- tolower($input)
- toupper($input)
- ucfirst($input)
- ucwords($input)  

$input is a unicode string