MCPcopy Create free account
hub / github.com/api-platform/website / createLocalePath

Function createLocalePath

pwa/app/sitemap.ts:15–19  ·  view source on GitHub ↗
(locale: Locale, path: string, edition?: string)

Source from the content-addressed store, hash-verified

13const basePath = getRootUrl();
14
15function createLocalePath(locale: Locale, path: string, edition?: string) {
16 const baseLocalePath =
17 i18n.defaultLocale === locale ? basePath : `${basePath}/${locale}`;
18 return `${baseLocalePath}/${edition ? `${edition}/` : ""}${path}`;
19}
20
21async function getAllConRoutes() {
22 const routes: string[] = [];

Callers 2

getAllConRoutesFunction · 0.85
sitemapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected