PHP code example of hoa / locale

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

    

hoa / locale example snippets


$locale = new Hoa\Locale(new Hoa\Locale\Localizer\Http());

echo
    'language : ', $locale->getLanguage(), "\n",
    'script   : ', $locale->getScript(), "\n",
    'region   : ', $locale->getRegion(), "\n",
    'variant  : ', implode(', ', $locale->getVariants()), "\n";