PHP code example of servergrove / servergrovelocalebundle

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

    

servergrove / servergrovelocalebundle example snippets

 php

// app/autoload.php

$loader->registerNamespaces(array(
    // ...
    'ServerGrove' => __DIR__.'/../vendor/bundles',
));
 php

// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new ServerGrove\LocaleBundle\ServerGroveLocaleBundle(),
    );
}
html
<img src="/images/locale/flags-en.png"/>
<img src="/images/locale/flags-es.png"/>