getRelativeLocaleUrl
returns an empty string
#13035
Labels
- P4: important
Violate documented behavior or significantly impacts performance (priority)
feat: i18n
Related to internalization (scope)
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
getRelativeLocaleUrl('en')
(whereen
is thedefaultLocale
) returns an empty string. This is a problem becausehref
cannot be empty as for example in a link tag<a href={getRelativeLocaleUrl('en')}>
. This would give<a href="">
when I expected<a href="/">
This is my astro config:
What's the expected result?
getRelativeLocaleUrl('en')
returns"/"
because an empty string is not a valid relative URL as demonstrated with the<a>
tagLink to Minimal Reproducible Example
https://stackblitz.com/edit/github-bvnpwdin-tdbvtznt
Participation
The text was updated successfully, but these errors were encountered: