Discussion on: 5 ways of displaying i18n translations in Vue

haruanm profile image
Haruan Justino

You will need to re-render the component.
This dirty workarround can be done in some ways listed here:

When I needed to, I used this:

  <my-component v-if="renderComponent" />
  export default {
    data() {
      return {
        renderComponent: true,
    methods: {
      forceRerender() {
        // Remove my-component from the DOM
        this.renderComponent = false;

        this.$nextTick(() => {
          // Add the component back in
          this.renderComponent = true;

and executed the forceRerender on watch for language change.