3 ms·
I was actually expecting to see i18n translations with lang. Something like: .i18n-hello:lang(:en) { content: "Hello"; } .i18n-hello:lang(:nl) {
by jbverschoor 7y ago
I was actually expecting to see i18n translations with lang. Something like:
.i18n-hello:lang(:en) {
content: "Hello";
}
.i18n-hello:lang(:nl) {
content: "Hallo";
}
<span class="i18n-hello">hello label</span>
That doesn't work, so you'd have to use ::after, but that requires some more verbose styling.
- angrais 7y agoBut this mixes content and style, so would be difficult to update (for non technical users etc.). Besides, it's fairly bad practice and won't scale to sentences well.