Skip to content

Several improvements - #3

Open
raphaelvigee wants to merge 7 commits into
jenyak:masterfrom
raphaelvigee:master
Open

Several improvements#3
raphaelvigee wants to merge 7 commits into
jenyak:masterfrom
raphaelvigee:master

Conversation

@raphaelvigee

Copy link
Copy Markdown

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
Comment thread composer.json Outdated

Copy link
Copy Markdown
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

jenyak commented Dec 5, 2015

Copy link
Copy Markdown
Owner

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

@raphaelvigee

Copy link
Copy Markdown
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