Closed
Description
Hello,
i have problem:
-
i set
noPrefixDefaultLocale
tofalse
in the description:
By default, paths generated for the default language don't contain a locale prefix, set this option to false to disable this behavior -
so the generated routes like this, good:
[
{
path: "/en/",
component: _3237362a,
name: "index-en"
},
{
path: "/fr/",
component: _3237362a,
name: "index-fr"
}
]
-
then when starting the app, do not redirect to
index
it shows404 page not found
error!!!
http://localhost:port/
-> error
http://localhost:port/en
-> index page with English -
what i want is some
setting
that change the default language after settingnoPrefixDefaultLocale: false
or add another auto generated route like this of the default language:
[
{
path: "/",
component: _3237362a,
name: "index-en" // the default language!!! or redirectRootToLocale content!!
},
{
path: "/en/",
component: _3237362a,
name: "index-en"
},
{
path: "/fr/",
component: _3237362a,
name: "index-fr"
}
]
- i think this :
redirectRootToLocale: 'en'
must work every time.
the problem as description said:
Specify a locale to which the user should be redirected when visiting root URL (/), doesn't do anything if noPrefixDefaultLocale is enabled
so make redirectRootToLocale
work every time to solve this as i think!!
and thank you :).
Metadata
Assignees
Labels
No labels