i18n icon indicating copy to clipboard operation
i18n copied to clipboard

Multi-Domain Website configuration with partial shared domains

Open silgon opened this issue 1 year ago • 0 comments

Discussed in https://github.com/nuxt-modules/i18n/discussions/2958

Originally posted by silgon May 26, 2024 I'm trying to build a multi-domain website. However, I want part of the languages to be on one site. I would like something like the following:

export default defineNuxtConfig({
  // ...

  i18n: {
    locales: [
      {
        code: 'en-US',
        domain: 'mydomain.com'
      },
      {
        code: 'es-MX',
        domain: 'mydomain.com/es-MX'
      },
      {
        code: 'ch-DE',
        domain: 'another-domain.ch'.
      },
      {
        code: 'ch-FR',
        domain: 'another-domain.ch/ch-FR'
      },
    ],
    differentDomains: true
    // Or enable the option in production only
    // differentDomains: (process.env.NODE_ENV === 'production')
  },

  // ...
})

I hope that it's clear what I want to do given the configuration. My guidelines where the following link https://v8.i18n.nuxtjs.org/guide/different-domains

Could somebody give me some guidance? I'm not able to do what I want. (also some insights in the sitemap with that kind of configuration would be cool, but not sure if this is the right place)

When I'm in the same domain, the language does not change (I use the href configuration as specified in the documentation)

silgon avatar Jun 16 '24 21:06 silgon