[Vuejs]-How to render dynamic translations in NuxtI18n?

0👍

Depends on your usage if you want to use i18n inside html you have to use {{ $t(the variable of string or simply ‘translate able string’) }} .
Otherwise if u wanna use it on JS side of the component you have to use this.$t(the variable of string or simply ‘translate able string’).
I assume that from your data the Name key inside your arrays are translate able, you don`t need to create 2 separate list for each one. Just introduce the names in en and ar. Then use $t to change between locales.

Leave a comment