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

feat(strategy): add PREFIX_AND_DEFAULT strategy #111

Merged
merged 3 commits into from
Aug 8, 2018

Conversation

odanado
Copy link

@odanado odanado commented Jul 22, 2018

This strategy generates the following routing.

nuxt.config.js:

{
  strategy: 'prefix_and_default',
  locales: [
    {
      code: 'ja',
      iso: 'ja',
      name: '日本語',
    },
    {
      code: 'en',
      iso: 'en-US',
      name: 'English',
    },
  ],
  defaultLocale: 'en',
}

routing:

[
  {
    path: "/",
    component: _3237362a,
    name: "index___en"
  },
  {
    path: "/en",
    component: _3237362a,
    name: "index___en"
  },
  {
    path: "/ja",
    component: _3237362a,
    name: "index___ja"
  },
]

demo: https://relaxed-snyder-764840.netlify.com/

@paulgv paulgv merged commit 4a3e2c1 into nuxt-modules:master Aug 8, 2018
@paulgv
Copy link
Collaborator

paulgv commented Aug 8, 2018

Thanks @odanado !

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

Successfully merging this pull request may close these issues.

2 participants