I18n router link

Hi, I need to use router link to change languages. Currently my code looks like this:

<b-navbar-item tag="router-link" v-for="locale in $i18n.availableLocales" :key="locale" :to="$router.currentRoute.params.lang = locale">
    {{locale}}
</b-navbar-item>

It kinda works. When I’m in home page it changes the route no problem.
from

#/en

to

#/cs

But when I’m in another route, it changes the route itself, not the lang param.
from

#/en/pricing

to

#/en/cs

Do you have any ideas how to fix this?

PS. I don’ t think it’s problem with my router setup, since manual change works just fine, but here is my setup…

const routes = [{
    path: '/',
    redirect: `/${i18n.locale}`
},
{
    path: '/:lang',
    component: {
        render(c) { return c('router-view')}
    },
    children: [
        {
            path: '/',
            name: 'Home',
            component: load('Home')
        },
        {
            path: 'pricing',
            name: 'Pricing',
            component: load('Pricing')
        }
    ]
}]

Found this solution:

<b-navbar-item tag="router-link" v-for="locale in $i18n.availableLocales" :key="locale" :to="linkCreator(locale, $router.currentRoute.name)">
    {{locale}}
</b-navbar-item>
export default {
    methods: {
        linkCreator: function (locale, route) {
            let result = '/'+locale+'/'
            if (route == 'Home') {
                return result
            } else {
                var str = route.toLowerCase()
                result += str
                return result
            }
        }
    }
}