Skip to content

Child routes have no language prefix for non default languages #359

Closed
@popescuandrei9mai

Description

Version

5.12.7

Reproduction link

https://codesandbox.io/s/codesandbox-nuxt-mpc6k

Steps to reproduce

Press the Child 1 button from home page. Switch the language to English.

What is expected ?

Route should change from '/despre/primul-copil' to '/en/about/first-child'

What is actually happening?

Route changes from '/despre/primul-copil' to '/about/first-child'

Additional comments?

Note that the default language is romanian so child routes for english should get the '/en' prefix.
The problem seems to come from this line https://github.com/nuxt-community/nuxt-i18n/blob/master/src/helpers/routes.js#L116

This bug report is available on Nuxt community (#c259)

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions