src/Sulu/Bundle/CategoryBundle/Category/KeywordManager.php
private function createTranslation(CategoryInterface $category, $locale)
    {
        $categoryTranslation = $this->categoryTranslationRepository->createNew();
        $categoryTranslation->setLocale($locale);
        $categoryTranslation->setTranslation('');
        $categoryTranslation->setCategory($category);
        $category->addTranslation($categoryTranslation);

        $this->entityManager->persist($categoryTranslation);

        return $categoryTranslation;
    }
private function createTranslation(CategoryInterface $category, $locale)
    {
        $categoryTranslation = $this->categoryTranslationRepository->createNew();
        $categoryTranslation->setLocale($locale);
        $categoryTranslation->setTranslation('');
        $categoryTranslation->setCategory($category);
        $category->addTranslation($categoryTranslation);

        $this->entityManager->persist($categoryTranslation);

        return $categoryTranslation;
    }
private function createTranslation ( CategoryInterface $ category , $ locale ) { $ categoryTranslation = $ this -> categoryTranslationRepository -> createNew ( ) ; $ categoryTranslation -> setLocale ( $ locale ) ; $ categoryTranslation -> setTranslation ( '' ) ; $ categoryTranslation -> setCategory ( $ category ) ; $ category -> addTranslation ( $ categoryTranslation ) ; $ this -> entityManager -> persist ( $ categoryTranslation ) ; return $ categoryTranslation ; }
Creates a new category translation for a given category and locale.

@param CategoryInterface $category
@param $locale

@return CategoryTranslationInterface
Creates a new category translation for a given category and locale .