If default_locale was set, and a web page was visited that doesn't have a langauge code in the path in the URL, the URL path parts returned by get_locale_prefixes() was wrong (e.g. /hrst/ instead of /hr/test/).
Description
I added checks that check if the collection part starts with the current locale or app_prefix before removing them.
Motivation and Context
I noticed the links for switching locales were wrong in the above described case.
Types of changes
[ ] Replay fix (fixes a replay specific issue)
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[ ] I have added or updated tests to cover my changes.
If default_locale was set, and a web page was visited that doesn't have a langauge code in the path in the URL, the URL path parts returned by get_locale_prefixes() was wrong (e.g. /hrst/ instead of /hr/test/).
Description
I added checks that check if the collection part starts with the current locale or app_prefix before removing them.
Motivation and Context
I noticed the links for switching locales were wrong in the above described case.
Types of changes
Checklist:
No idea how to test.