Please Disable Your Browser Adblock Extension for our site and Refresh This Page!

our ads are user friendly, we do not serve popup ads. We serve responsible ads!

Refresh Page
Skip to main content
On . By CodimTh

In this post, I will show you how to translate text with parameters with Vue I18n in Vue.js.

Simple text

To use a translation use the $t() function with a translation id as parameter:

  <p>{{ $t('hello') }}</p>

Text with parameters

You can of course add parameters to your translation texts:

    "hello": "Hallo {name}!",
  <p>{{ $t('hello', { name: 'Vue.js'}) }}</p>

Riadh Rahmi

Senior Web Developer PHP/Drupal & Laravel

I am a senior web developer, I have experience in planning and developing large scale dynamic web solutions especially in Drupal & Laravel.

Web Posts


Page Facebook