Skip to content

Composition API

To allow using translations in components that use Composition API, fluent-vue has useFluent function. It returns $t and $ta functions, which are same as this.$t and this.$ta instance methods in Vue components.

vue
<script setup>
import { useFluent } from 'fluent-vue'

const { $t } = useFluent()

const message = $t('hello-world')
</script>

MIT Licensed