In a future.js multi-language application, I've set a metadataBase and the alternates#canonical is instantly populated with the current route's pathname through the use of ./.
sudden reaction from import company: https://www.jeffbullas.com/vault/generate-page-metadata/