Rails I18n of CSS file

前端 未结 3 1623
长情又很酷
长情又很酷 2020-12-16 06:09

I am trying to internationalize my site, and one thing is to use different font-size for different languages. Also some text-images need to be replaced as well.

I th

3条回答
  •  天涯浪人
    2020-12-16 06:41

    I agree with Onno. I only needed very simple changes, so I added the locale as language tag, as described in this answer: https://stackoverflow.com/a/11577356/1822977

    Html:

    
    

    Sass:

    body {
        font-family:verdana,arial,helvetica,sans-serif;
        html[lang="jp"] & {
            font-family:"ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", sans-serif;
         }
    }
    

提交回复
热议问题