mikehaertl / localeurls

Automatic locale/language management for URLs
10 stars 3 forks source link

changed the way lang code was removed from url #8

Closed mbohal closed 11 years ago

mbohal commented 11 years ago

When the language code was part of the url (i.e. http://myserver.com/en/page--en/view) the 'en/' part got removed in all its occurrences. The url thus became http://myserver.com/en/page--view. Ive used regexp to make sure replacement only takes place at the beginning of the string and no more then once.

mikehaertl commented 11 years ago

@mbohal Thanks for your PR! Actually i think, we can avoid another preg call: we just have to cut off some characters at the beginning of the URL. Can you test with latest master?

mbohal commented 11 years ago

@mikehaertl The fix in master is working fine and it is a cleaner solution. Thank you, Ill use it in my app rightaway...

mikehaertl commented 11 years ago

Great. Created 1.1.6 tag. Thanks for your help.