Skip to content

[Book][Translation] Added tip for routing params #4803

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 25, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion book/translation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ via the ``request`` object::

.. tip::

Read :doc:`/cookbook/session/locale_sticky_session` to learn, how to store
Read :doc:`/cookbook/session/locale_sticky_session` to learn how to store
the user's locale in the session.

.. index::
Expand Down Expand Up @@ -502,6 +502,11 @@ as the locale for the current request.
You can now use the locale to create routes to other translated pages
in your application.

.. tip::

Read :doc:`/cookbook/routing/service_container_parameters` to learn how to
avoid hardcoding the ``_locale`` requirement in all your routes.
Copy link
Member

Choose a reason for hiding this comment

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

I have a question about the use of the word requirement in this tip. Are you referring to a real route requirement option or are you using it as a regular word? If that's the case, we could change it to avoid confusions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I took it from the referenced entry

You could hardcode your _locale requirement in all your routes [...]

For me it's referring to the route option but I understand your question, it is maybe also interpretable as the regular word. As a non-native speaker I would say, the sentence is still valid then, isn't it?

Copy link
Member

Choose a reason for hiding this comment

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

This is exactly about route requirements as in the example route above, isn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that's right.


Setting a default Locale
~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down