getLocaleAbsoluteUrl() — astro Function Reference
Architecture documentation for the getLocaleAbsoluteUrl() function in index.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD cf355024_249a_7bed_bfe7_1053cdb82b44["getLocaleAbsoluteUrl()"] e4a1ef92_c598_36b5_dc33_9ab2535360bc["index.ts"] cf355024_249a_7bed_bfe7_1053cdb82b44 -->|defined in| e4a1ef92_c598_36b5_dc33_9ab2535360bc 66f0f5a6_e902_0cba_8a68_5853da33a41f["getLocaleAbsoluteUrlList()"] 66f0f5a6_e902_0cba_8a68_5853da33a41f -->|calls| cf355024_249a_7bed_bfe7_1053cdb82b44 5ea57fa1_9639_1ac7_9ffa_757ade8153be["getLocaleRelativeUrl()"] cf355024_249a_7bed_bfe7_1053cdb82b44 -->|calls| 5ea57fa1_9639_1ac7_9ffa_757ade8153be style cf355024_249a_7bed_bfe7_1053cdb82b44 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/src/i18n/index.ts lines 121–143
export function getLocaleAbsoluteUrl({ site, isBuild, ...rest }: GetLocaleAbsoluteUrl) {
const localeUrl = getLocaleRelativeUrl(rest);
const { domains, locale } = rest;
let url;
if (isBuild && domains && domains[locale]) {
const base = domains[locale];
url = joinPaths(base, localeUrl.replace(`/${rest.locale}`, ''));
} else {
if (localeUrl === '/') {
url = site || '/';
} else if (site) {
url = joinPaths(site, localeUrl);
} else {
url = localeUrl;
}
}
if (shouldAppendForwardSlash(rest.trailingSlash, rest.format)) {
return appendForwardSlash(url);
} else {
return url;
}
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does getLocaleAbsoluteUrl() do?
getLocaleAbsoluteUrl() is a function in the astro codebase, defined in packages/astro/src/i18n/index.ts.
Where is getLocaleAbsoluteUrl() defined?
getLocaleAbsoluteUrl() is defined in packages/astro/src/i18n/index.ts at line 121.
What does getLocaleAbsoluteUrl() call?
getLocaleAbsoluteUrl() calls 1 function(s): getLocaleRelativeUrl.
What calls getLocaleAbsoluteUrl()?
getLocaleAbsoluteUrl() is called by 1 function(s): getLocaleAbsoluteUrlList.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free