Testing page

message.title: {{ $t('message.title') }}

message.body: {{ $t('message.body') }}

custom.option1: {{ $t('custom.option1')}}

Footer: {{ 'message.footer' | translate }}

Set language and load translations

Current Language: {{ $i18n.locale() }}

Available locales


With computed propery:

Show fallback language translation

no german translation available

The fallback translation is: {{ $t('message.title') }}

Translation for specific language

The english translation is: {{ $tlang('en', 'message.title') }}

Render list with translations and options

Render translation with pluralization (specified with :::)

Number of Blocks:

{{ $t('plural', {count: count}, count) }}

Render translation with pluralization (specified as array)

Number of Blocks:

{{ $t('plural_from_array', {count: count}, count) }}

Use default values and identifier keys

Show the specified default value if the key does not exist in the current and the fallback locale:
Number for pluralization:

{{ $t('not.existing', 'Default text for not existing key ::: Pluralized default text for not existing key', {}, countDefault) }}

Pluralization without key specified

Lookup separate pluralization string parts by keys:
Number for pluralization:

{{ $t('pluralization_singular ::: pluralization_plural ::: pluralization_none', {}, countDefault) }}

Test if a key exists

Show custom text if the key 'weird.translation' does not exist:

STRICT: {{ $t('weird.translation') }}

LOCALE: {{ $t('weird.translation') }}

FALLBACK: {{ $t('weird.translation') }}

DEFAULT: {{ $t('weird.translation') }}

DEFAULT: DOES NOT EXIST

Add a new french locale

{{ $t('weird.translation') }}

Load missing translations asynchronously

Value: {{ $t('async.value') }}

Promise: {{ $t('async.promise') }}