PHP code example of qbbr / locale-configurator-bundle
1. Go to this page and download the library: Download qbbr/locale-configurator-bundle 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/ */
qbbr / locale-configurator-bundle example snippets
// config/bundles.php
return [
// ...
Qbbr\LocaleConfiguratorBundle\LocaleConfiguratorBundle::class => ['all' => true],
];
use Qbbr\LocaleConfiguratorBundle\Configurator\LocaleConfigurator;
class SomeService
{
private LocaleConfigurator $lc;
public function __construct(
LocaleConfigurator $lc
) {
$this->lc = $lc;
}
public function something()
{
// $this->lc->setLocale('ru');
$param1 = $this->lc->get('param1');
}
}