It’s just my thought.
For that case, you set the routes without language, and change middleware not to redirect leaving setting language as it is.
Honestly, I haven’t fully tested this thought.
/*
* 1. sets i18n.locale and state.locale if possible
* 2. redirects if not with locale
*/
export default function ({
isHMR, app, store, route, params, error, redirect
}) {
// if (isHMR) { // ignore if called from hot module replacement
// return;
// } // if url does not have language, redirect to english
// else if (!params.lang) {
// return redirect('/en'+route.fullPath);
// } // based on directory structure _lang/xxxx,
// en/about has params.lang as "en"
// const locale = params.lang || 'en';
const locale = XXXXXXXXXXXXXXXXX; // read from cookie store.commit('SET_LANG', locale); // set store
app.i18n.locale = store.state.locale;
}