Is there a way to translate css selectors(::after, ::before) content using ngx-translate ?
.custom-file-label::after {
content: "Browse"
}
Is there a way to translate css selectors(::after, ::before) content using ngx-translate ?
.custom-file-label::after {
content: "Browse"
}
in html add
<div class="custom-file-label" [attr.your-custom] = "{{ 'Browse' | translate}}"></div>
and in css
.custom-file-label::after {
content: attr(your-custom);
}
© 2022 - 2024 — McMap. All rights reserved.
[attr.your-custom]
because the following value is a template expression and not an identifier from the ts class. Then it worked great, but it left us with a warning complaining that your-custom is not an allowed attribute. Using the prefixdata-
did not help with that either. – Vedette