Skip to content

Annotation routing I18l is not working for Symfony 3.4 #112

@kusiu

Description

@kusiu

I18nRoutingBundle doesn't seem to be working for Symfony 3.4.

JobController.php

use BeSimple\I18nRoutingBundle\Routing\Annotation\I18nRoute;

class JobController extends Controller
{
    /**
     *
     * @I18nRoute({ "en": "/jobs", "pl": "/ogloszenia" }, name="jobs")
     * @Method("GET")
     */
    public function jobsListAction()
    {
        $jobs = $this->getDoctrine()
            ->getRepository(Job::class)
            ->findAllActive();
    
        return $this->render('job/list.html.twig', [
            'jobs' => $jobs,
        ]);
    }
}

config.yml

be_simple_i18n_routing:
    annotations: true

error:

An exception has been thrown during the rendering of a template ("I18nRoute "jobs" (pl) does not exist.").

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions