PHP code example of domprojects / codeigniter4-localize
1. Go to this page and download the library: Download domprojects/codeigniter4-localize 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/ */
domprojects / codeigniter4-localize example snippets
public string $defaultLocale = 'en';
public array $supportedLocales = ['en', 'fr'];
namespace Config;
use domProjects\CodeIgniterLocalize\Config\Localize as BaseLocalize;
class Localize extends BaseLocalize
{
public bool $redirectRoot = true;
public bool $redirectMissingLocale = true;
public string $invalidLocaleBehavior = '404';
public array $excluded = [
'api/*',
'assets/*',
'favicon.ico',
'robots.txt',
];
}