Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the auto-complete alternate langs #2784

Open
2 of 4 tasks
luca-smartpricing opened this issue Feb 13, 2024 · 1 comment
Open
2 of 4 tasks

Remove the auto-complete alternate langs #2784

luca-smartpricing opened this issue Feb 13, 2024 · 1 comment

Comments

@luca-smartpricing
Copy link

Describe the feature

Hi! I've a website with the following langs it, de, en and all the path in the translated lang have it's own path
/it/come-funziona
/de/produkt
/en/how-it-works

ok, that's easy, I have de following config:

defineI18nRoute({
  locales: ['it', 'de', 'en'],

  paths: {
    it: '/come-funziona',
    de: '/produkt',
    en: '/how-it-works'
  }
})

And if I have one less lang for a path it's something like:

defineI18nRoute({
  locales: ['it', 'en'],

  paths: {
    it: '/partner',
    en: '/partner'
  }
})

Ok, now the problem appear with dynamic pages. Because in the "blog" section not all articles are translated in all lang

defineI18nRoute({
  locales: ['it', 'en', 'de'],

  paths: {
    it: '/[blog]',
    en: '/[blog]',
    de: '/[blog]'
  }
})

// this specific article is not translated in `en`
setI18nParams({
    it: { blog: 'blog-1-it' },
    de: { blog: 'blog-1-de' },
})

So why is the following path added by default /en/blog-1-it? I think this behavior is similar to a bug. I don't want that to ever happen. Not even on non-dynamic pages
I prefer something like

defineI18nRoute({
  paths: {
    it: '/partner',
    en: '/partner'
  }
})

without having to specify the list of languages.

By default i have 3 langs, yes. And lang switcher always show 3 langs but if I don't set one it means that it doesn't exist, it makes no sense that only the /en prefix is changed and a route that doesn't exist is created.
This compromises the entire management of rel=alternate and SEO.

I kindly ask you to give an answer to this question and look for a solution together because I think that the use of i18n is really complex if brought back to real management situations with a CMS.
After almost a year of use there are still many problems related to SEO, changing languages, creating sitemaps, dynamic pages, etc.

Thank you very much

Additional information

  • Would you be willing to help implement this feature?
  • Could this feature be implemented as a module?

Final checks

@BobbieGoede
Copy link
Collaborator

So why is the following path added by default /en/blog-1-it? I think this behavior is similar to a bug. I don't want that to ever happen. Not even on non-dynamic pages

By default i have 3 langs, yes. And lang switcher always show 3 langs but if I don't set one it means that it doesn't exist, it makes no sense that only the /en prefix is changed and a route that doesn't exist is created.
This compromises the entire management of rel=alternate and SEO.

The reason behind this is probably similar to route and page generation, it is by default assumed that you are serving a page in each configured language. As you have noticed in #2782, opinions differ on what should happen if a param translation is not provided, I agree it's preferable to skip tags if no translation has been provided.

I kindly ask you to give an answer to this question and look for a solution together because I think that the use of i18n is really complex if brought back to real management situations with a CMS.
After almost a year of use there are still many problems related to SEO, changing languages, creating sitemaps, dynamic pages, etc.

This module is maintained by only a few people who work on this in their spare time, your suggestions, discussions and issues are appreciated, and at the end of the day we can only do so much so contributions are also very much welcome.

If I have time I'll see if I can come up with a solution for this issue, I'll take what's discussed in #2782 into account.

@BobbieGoede BobbieGoede removed the v8 label Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants