Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to localize content blocks in css?

So as has become fairly common practice we are using css content to position text that is really "style" specific. eg

.label:after { content: ":"; }

it was pointed out to me however that this sort of thing varies in certain cultures. Uh oh.

Does anyone have a good pattern for dealing with this sort of thing since CSS files are not typically passed through an asp.net processor and therefore have no access to the resources files.

like image 812
George Mauer Avatar asked Dec 02 '22 21:12

George Mauer


1 Answers

How about this approach? It'll let you switch it up based on the lang attribute.

html label:after { content: '' }
html[lang=en] label:after { content: ':' }
like image 148
Bill Criswell Avatar answered Dec 14 '22 08:12

Bill Criswell