![Creative The name of the picture]()

Clash Royale CLAN TAG#URR8PPP
how to include <strong> tag in 18n
on my message.json file
"step5":{
"message": "Press Start.<strong>Warning:</strong>
}
it finally shows like this
Press Start.<strong>Warning:</strong>
Press Start.<strong>Warning:</strong>
but i want to show it like this Press Start Warning:
(warning should be strong in the front end, what i should do?)
1 Answer
1
I suggest you split your tag into two different tags.
So your current:
"step5":{
"message": "Press Start.<strong>Warning:</strong>"
}
Becomes:
"step5" : {
"message": "Press Start.",
"message_warning": "Warning:",
}
This way, your markup is unchanged, and whenever you need to update it, you can reuse the tags you defined before.
Let's assume you're using a template engine such as Pug, with this kind of markup:
.alert
p Press Start!
strong Warning!
Over time, you probably will need to change the markup to something like:
.new-alert
p Press Start
(...)
.another-div
button Warning!
Using tag separation, this change will not affect markup as it focuses on the text and not the actual markup.
i18n
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
your solution is amazing.Do we have a easier way?
– 12345GG
yesterday