Skip to content

Incorrect translation of external links #55

@simonhenke

Description

@simonhenke

Some version between 1.8.0-1 and 1.9.1 now causes external links to be translated incorrectly:
I'm passing a href like
https://www.dhl.com/de-de/home/tracking/tracking-express.html
and the lib parses it to
/de-de/home/tracking/tracking-express.html

My current workaround is something like
const Link = href.toString().startsWith("http") ? NextLink : NextTranslateRoutesLink;
which I then render in a custom component.

But it would be better if the next-translate-routes wouldn't translate external links.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions