PHP code example of ledgr / localefacade

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

    

ledgr / localefacade example snippets


use ledgr\localefacade\LocaleFacade;

$l = new LocaleFacade('de');

// Prints 'Deutsch'
echo $l->getDisplayName();

// Prints 'Schweden'
echo $l->getDisplayCountries()['SE'];

$arr = array(
    'ü',
    'u',
    'ß',
    's'
);
$l->createCollator()->sort($arr);

// Prints 's, ß, u, ü'
print_r($arr);

// And all the other Locale methods...