You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the fixHref is used internally and not directly exposed to the API of the library. This is why is not in the documentation. However, you can use it in this way:
importfixHreffrom'next-translate/_helpers/fixHref'//...const{ t, lang }=useTranslation()console.log(fixHref('/test',lang))// -> /en/test
Perhaps we could consider to move fixHref and fixAs to the first level API next-translate/fixHref and next-translate/fixAs, because they are stable and useful.
Having the
<Link>
component is super nice but there are places where I'd like to get a string instead of an anchor element.Is there a way you can expose the internal
fixHref
function to be used?The text was updated successfully, but these errors were encountered: