astro-i18n-aut
Version:
The i18n integration for Astro 🧑🚀
32 lines • 691 B
TypeScript
/**
* @returns url with chosen locale prefix
* * @example
* ```ts
* getLocaleUrl("/es/about", "en") // "/about"
* ```
* * @example
* ```ts
* getLocaleUrl("/es/about", "fr") // "/fr/about"
* ```
* @example
* ```ts
* getLocaleUrl("/about", "es") // "/es/about"
* ```
*/
/**
* @returns url with chosen locale prefix
* * @example
* ```ts
* getLocaleUrl("/es/about", "en") // "/about"
* ```
* * @example
* ```ts
* getLocaleUrl("/es/about", "fr") // "/fr/about"
* ```
* @example
* ```ts
* getLocaleUrl("/about", "es") // "/es/about"
* ```
*/
export declare function getLocaleUrl(url: URL | string, locale: string): string;
//# sourceMappingURL=getLocaleUrl.d.ts.map