for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/*
* This file is part of the Sonata Project package.
*
* (c) Thomas Rabaix <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sonata\TranslationBundle\Traits\Gedmo;
/**
* If you don't want to use trait, you can extend AbstractTranslatable instead.
* @author Nicolas Bastien <[email protected]>
trait TranslatableTrait
{
* @Gedmo\Locale
* Used locale to override Translation listener`s locale
* this is not a mapped field of entity metadata, just a simple property
* @var string
protected $locale;
* @param string $locale
public function setLocale($locale): void
$this->locale = $locale;
}
* @return string
public function getLocale()
return $this->locale;