PHP code example of jorisnoo / craft-locale-redirect

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

    

jorisnoo / craft-locale-redirect example snippets


return [
    'modules' => [
        'locale-redirect' => \Noo\CraftLocaleRedirect\Module::class,
    ],
    'bootstrap' => ['locale-redirect'],
];



return [
    'excludeSites' => [],
    'exclude' => [],
    'only' => [],
    'fallback' => null,
    'crossHostRedirects' => false,
];

'excludeSites' => ['english', 'german'],

'exclude' => ['de', 'it'],

'only' => ['en', 'fr'],

'fallback' => '/en',

'crossHostRedirects' => true,