PHP code example of milqmedia / mq-locale

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

    

milqmedia / mq-locale example snippets


curl -s http://getcomposer.org/installer | php
php composer.phar install

'mq_locale' => array(
    'default' => 'nl-NL',
),

'mq_locale' => array(
    'supported' => array('en-US', 'en-GB'),
),

'mq_locale' => array(
    'strategy' => 'host'
),

<html lang="en">

$locale = $this->parseDefaultLanguage();
echo $locale; #nl-NL

$language = $this->getCurrentLanguage(); // Returns a Application\Entity\Language object
echo $language->getDescription(); // Dutch