If project have to use subdirectories (lang prefixes), like:
example.com/user - for English
example.com/de/user - for German
example.com/ko/user - for Korean
We will face some problems:
if /user node is children of / node as well as children of /ko node.
When code will try to find a match for /user by going through / node, it will slice / from /user segment, so at the next iteration code will try to find a match for user instead of /user, thus will return null as result.
So my proposal is to change literally one line of code, this shouldn't break anything, if i understand everything right.
If project have to use subdirectories (lang prefixes), like:
example.com/user
- for Englishexample.com/de/user
- for Germanexample.com/ko/user
- for KoreanWe will face some problems: if
/user
node is children of/
node as well as children of/ko
node. When code will try to find a match for/user
by going through/
node, it will slice/
from/user
segment, so at the next iteration code will try to find a match foruser
instead of/user
, thus will returnnull
as result.So my proposal is to change literally one line of code, this shouldn't break anything, if i understand everything right.