in a very subsequent.js multi-language application, I have established a metadataBase along with the alternates#canonical is quickly populated with The existing route's pathname through the use of ./.
In this article, https://www.jeffbullas.com/vault/generate-page-metadata/