Open nasvillanueva opened 6 months ago
I suppose that as
should be optional. If it is not specified, <ReI18n />
is displayed as a <template>
tag.
Exactly! I wasn't just sure whether you actually use <template>
tag. I quickly looked at the component source code, couldn't find <template>
tag. If it's there, I must be blind 😅
Overview
vue-i18n
<I18nT>
component supports atag
prop that wraps the translated message with the provided tag. It also supports fallthrough attributes.Current usages that we have always have a wrapper.
If we support the tag prop, we can have something like this:
I used
as
instead of vue-i18n'stag
prop since it feels nicer to read. I got it from HeadlessUI's containers.By default, we can still render just a text node.
References
tag
propas
prop