I am try to generate a dynamic sitemap from a list of items.
In my project I use @nuxt/i18n for path translations. I have the following configuration of the i18n module:
If I use the _i18nTransform option for the sitemap generation I'm expecting that the sitemap will have an entry in the en version with /en/terms-and-conditions loc and one in the italian sitemap with the loc /it/termini-e-condizioni but the generated sitemaps has both the terms-and-conditions path at the end without translation. It seems that the _i18nTransform option only append the language prefix in the beginning part of the url. Is it true or I have to configure something else?
The _i18nTransform config does not support the i18n pages config, I'd suggest having these as a static file if possible. This config should only be needed for dynamic data.
š What are you trying to do?
Good morning,
I am try to generate a dynamic sitemap from a list of items. In my project I use @nuxt/i18n for path translations. I have the following configuration of the i18n module:
i18n: { baseUrl: 'https://mydomain.com', locales, defaultLocale: 'en', strategy: 'prefix', detectBrowserLanguage: { useCookie: true, cookieKey: 'i18n_redirected', redirectOn: 'root', }, customRoutes: 'config', // disable custom route with page components pages: { 'terms-and-conditions': { en: 'terms-and-conditions', it: 'termini-e-condizioni', } }, },
If I use the
_i18nTransform
option for the sitemap generation I'm expecting that the sitemap will have an entry in the en version with /en/terms-and-conditions loc and one in the italian sitemap with the loc /it/termini-e-condizioni but the generated sitemaps has both the terms-and-conditions path at the end without translation. It seems that the_i18nTransform
option only append the language prefix in the beginning part of the url. Is it true or I have to configure something else?Thanks!
š What have you tried?
No response
ā¹ļø Additional context
No response