Is there a way to translate css selectors(::after, ::before) content using ngx-translate?

1.2k views Asked by At

Is there a way to translate css selectors(::after, ::before) content using ngx-translate ?

.custom-file-label::after {
    content: "Browse"
}
1

There are 1 answers

2
MargeKh On

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);
 }