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

How to specify a route for only one language? #2

Closed
luminarious opened this issue Dec 6, 2017 · 3 comments
Closed

How to specify a route for only one language? #2

luminarious opened this issue Dec 6, 2017 · 3 comments

Comments

@luminarious
Copy link

luminarious commented Dec 6, 2017

Right now the routes are generated per language. How would I specify that I want a route to be available in just one language?

Using _locale as the first param caused some issues before, but at least we could easily separate pages that are localized and pages that should be used as-is.

/pages/_locale/index.vue
/pages/en/styleguide.vue
This question is available on Nuxt.js community (#c1)
@paulgv
Copy link
Collaborator

paulgv commented Dec 6, 2017

Hi @luminarious
That's an interesting point. I just opened a PR with a possible solution, I'd be curious to have to opinion on this. I added a new option ignoreRoutes which you can use to list routes that should be skipped when generating localized routes: https://github.com/paulgv/nuxt-i18n/pull/3

In your specific case, ignoreRoutes would look like this:

ignoreRoutes: [
  'en-styleguide'
]

You can give this specific branch a try in your project:

yarn add https://github.com/paulgv/nuxt-i18n.git#feature/ignore-routes-localization

@paulgv
Copy link
Collaborator

paulgv commented Jan 22, 2018

@ghost
Copy link

ghost commented Aug 11, 2018

This question has been resolved by @paulgv, see answer.

@ghost ghost added the cmty:status:resolved label Aug 11, 2018
farnabaz pushed a commit to farnabaz/i18n-module that referenced this issue Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants