protected function translateCategory(Locale $locale, CategoryInterface $category, $name)
    {
        /**
         * @var $translation \WellCommerce\Bundle\CategoryBundle\Entity\CategoryTranslation
         */
        $translation = $category->translate($locale->getCode());
        $slug        = $this->getLocaleSlug($locale, $name);
        $translation->setName($name);
        $translation->setSlug($slug);
        $category->mergeNewTranslations();
    }
protected function translateCategory(Locale $locale, CategoryInterface $category, $name)
    {
        /**
         * @var $translation \WellCommerce\Bundle\CategoryBundle\Entity\CategoryTranslation
         */
        $translation = $category->translate($locale->getCode());
        $slug        = $this->getLocaleSlug($locale, $name);
        $translation->setName($name);
        $translation->setSlug($slug);
        $category->mergeNewTranslations();
    }
protected function translateCategory ( Locale $ locale , CategoryInterface $ category , $ name ) { /**
         * @var $translation \WellCommerce\Bundle\CategoryBundle\Entity\CategoryTranslation
         */ $ translation = $ category -> translate ( $ locale -> getCode ( ) ) ; $ slug = $ this -> getLocaleSlug ( $ locale , $ name ) ; $ translation -> setName ( $ name ) ; $ translation -> setSlug ( $ slug ) ; $ category -> mergeNewTranslations ( ) ; }
Translates the category

@param Locale   $locale
@param CategoryInterface $category
@param string   $name
Translates the category