How to dynamically change the specified position of vue i18n multilingual text to achieve placeholder replacement?

topic description

vue i18n specifies the text position to insert dynamic text information, if placeholder replacement is implemented?

sources of topics and their own ideas

multilingual switching often requires inserting dynamic information into fixed text. I"ve seen other languages replace placeholder marks before, but I don"t know how to implement i18n

.

related codes

for example:
message: {
hello: "Hello" {0}
}

what result do you expect? What is the error message actually seen?

can realize such things as Hello lucy and Hello Rosi

.
Mar.25,2021

message: {
hello: 'Hello {name}'
}

this.$t ('file name .message.hello', {name:this.name})

Menu