PHP code example of phpinnacle / intl

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

    

phpinnacle / intl example snippets


use PHPinnacle\Intl\Countries;
use PHPinnacle\Intl\Languages;
use PHPinnacle\Intl\Locales;
use PHPinnacle\Intl\Timezones;

Countries::list();
Countries::name('PL');
Languages::exists('eng');
Locales::default();
Timezones::name('Europe/Warsaw');

use PHPinnacle\Intl\Rules\CountryCode;
use PHPinnacle\Intl\Rules\LanguageCode;

return [
    'country' => [new CountryCode],
    'language' => [new LanguageCode],
];

use PHPinnacle\Intl\Filters\CountryFilter;
use PHPinnacle\Intl\Forms\CountryPicker;
use PHPinnacle\Intl\Forms\LanguagePicker;
use PHPinnacle\Intl\Forms\LocalePicker;
use PHPinnacle\Intl\Forms\TimezonePicker;

CountryPicker::make('country');
LanguagePicker::make('language');
LocalePicker::make('locale');
TimezonePicker::make('timezone');
CountryFilter::make();