nuxt-modules / i18n

I18n module for Nuxt
https://i18n.nuxtjs.org
MIT License
1.76k stars 484 forks source link

Disable locale for some pages with setI18nParams #3191

Closed Tofandel closed 3 weeks ago

Tofandel commented 1 month ago

Describe the feature

Usually to define parameters translation we use setI18nParams({fr: {param: 'foo'}), but what if we want to disable a locale for a specific page dynamically (for example because the backend said that the page is not yet translated)

It seems doing setI18nParams({fr: false) could be a solution but currently with this it just acts like if the function was not even called

Additional information

Final checks

BobbieGoede commented 3 weeks ago

If I understand correctly this sounds like a feature that would resolve #2782, is that right?

Tofandel commented 3 weeks ago

Yeah that's actually a duplicate, the title of that issue is not very descriptive of the problem but I guess I'll close this one and continue the discussion there

BobbieGoede commented 3 weeks ago

Agreed the title is not very descriptive, I've updated it to something that more closely matches yours, hopefully it will help others find it too 🙏