Skip to content

Conversation

@frankdejonge
Copy link
Contributor

No description provided.

@frankdejonge
Copy link
Contributor Author

I've chosen to use the PHP configurator DSL as the example. I hadn't seen it used previously in the examples. This might be something we'll need to look into in a broader sense.

@frankdejonge
Copy link
Contributor Author

Status: Needs work

@frankdejonge
Copy link
Contributor Author

@javiereguiluz the docs for the docs say the PRs get automatically built by platform.sh? Are they published somewhere too?

@DylanDelobel
Copy link
Contributor

If this one is merged, should close #9510

routing.rst Outdated
/**
* Matches /blog exactly
*
* @Route("/blog", name="blog_list")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The annotation example look wrong to me. It should have the same routes as the YAML, XML, and PHP examples.

routing.rst Outdated
// /blog/2?category=Symfony

Generating Localized URLs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be stripped to match the length of the headline

};
When a localized route is matched Symfony will automatically know which locale
should be used during the request. Defining routes this way also eliminated the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"eliminates"?

routing.rst Outdated
Generating Localized URLs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

When you've defined localized routes Symfony will use the current request locale
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[...] routes, Symfony [...]

routing.rst Outdated

When you've defined localized routes Symfony will use the current request locale
as the default when generating routes. In order to generate the route for alternative
locale you must pass the ``_locale`` in the parameters array::
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"for alternative locales" or "for an alternative locale"

@michaelperrin
Copy link
Contributor

This paragraph should be removed with this new documentation: http://symfony.com/doc/master/routing.html#translating-routes

@xabbuh xabbuh changed the base branch from master to 4.1 May 8, 2018 08:40
routing.rst Outdated
->controller('App\Controller\CompanyController::about');
};
When a localized route is matched Symfony will automatically know which locale
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When a localized route is matched, Symfony will automatically know, which ... and perhaps matches instead of is matched?

@javiereguiluz
Copy link
Member

Frank, thanks for contributing these docs. Thank you also for implementing this fantastic feature! The community loves it and it's definitely one of the best new features of Symfony 4.1. By the way, congrats on your first Symfony Docs contribution too!

@javiereguiluz javiereguiluz merged commit fe8027c into symfony:4.1 May 27, 2018
javiereguiluz added a commit that referenced this pull request May 27, 2018
This PR was merged into the 4.1 branch.

Discussion
----------

[Routing] i18n routing.

Commits
-------

fe8027c Minor tweak
2341bf9 Minor rewords and fixes
f7c8839 handle => handy
87be2eb Initial docs on i18n routing.
This was referenced May 27, 2018
javiereguiluz added a commit that referenced this pull request May 27, 2018
This PR was merged into the 4.1 branch.

Discussion
----------

Removed an outdated section

After merging #9515 we forgot to remove this deprecated section, as pointed by @michaelperrin in this comment: #9515 (comment)

Commits
-------

00ec943 Removed an outdated section
@frankdejonge frankdejonge deleted the feature/i18n-routing-docs branch May 28, 2018 11:39
@frankdejonge
Copy link
Contributor Author

@javiereguiluz thank you! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants