Is it possible to get a value from a language via parameter of t()? #100
-
I'm looking for a way to fetch some keys from different languages at the same place without changing the global locale. For example: const greetings = {
en: $t('common.hello', 'en'),
no: $t('common.hello', 'no'),
fr: $t('common.hello', 'fr'),
} Or maybe another way to fetch all values from a key: const greetings = $t('common.hello').all() Might be related to #88 |
Beta Was this translation helpful? Give feedback.
Answered by
jarda-svoboda
Jul 9, 2023
Replies: 1 comment
-
Hi @kamerat. {$l('locale', 'key', {/* props */})} Don't forget to load all needed language mutations using You can find an example here. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jarda-svoboda
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @kamerat.
Yes, it is. That's what is
$l
born for..)Don't forget to load all needed language mutations using
loadTranslations
method.You can find an example here.