next-i18next
Version:
The easiest way to translate your NextJs apps.
1 lines • 136 B
JavaScript
export const addSubpath = (url, subpath) => url.replace('/', `/${subpath}/`).replace(/(https?:\/\/)|(\/)+/g, "$1$2").replace(/\/$/, '');
The easiest way to translate your NextJs apps.