Skip to content
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

Several improvements #3

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Several improvements #3

wants to merge 7 commits into from

Conversation

raphaelvigee
Copy link

In a project, I had to generate every URLs localized, and also the non-localised default locale URL.
I think it's better to let the user a free choice on this point.
To set the option :

$app['i18n_routing.allow_localized_default'] = true;

Let's say I have french and english languages enable.
With the option set to false, this will result in the following generated URLs :

/fr/test
/en/test

With the option set to true, this will result in the following generated URLs :

/test
/fr/test
/en/test

@raphaelvigee raphaelvigee changed the title Add ability to generate default non localized URL Several improvements Dec 3, 2015
"description": "Silex i18n routing service provider.",
"keywords": ["silex", "i18n routing"],
"license": "MIT",
"require": {
"silex/silex": "~2.0@dev",
"silex/silex": "~1.0@dev",
Copy link
Owner

Choose a reason for hiding this comment

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

There is another branch https://github.com/jenyak/I18nRoutingServiceProvider/tree/1.0 for support silex 1

@jenyak
Copy link
Owner

jenyak commented Dec 5, 2015

@thegeekrv can you also add test for $app['i18n_routing.allow_localized_default'] = true;?

@raphaelvigee
Copy link
Author

Sorry I did a mistake by committing the name change.
I will remove my i18n_ignore.
I dont't know how to make the test, not an expert with phpunit...

This reverts commit 3541c2a.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants