Question: I am using @ngx/translate core for lang change.
I want to define sass on the basic of

```
<body lang="en">

```

or 

```
<body lang="fr">

```

by if else condition.

```
Inside my component sass i want to do something like this

@if( bodylang = en)

/these rules

else 

// these rules

```

How can i achieve this?

Answer: 
As it is SCSS you are able to use CSS attribute selectors for this, for example:

```
a[target="_blank"] { 
    background-color: yellow;
}

```

Which in your case would be:

```
body[lang="en"] {
    // Your code
}

body[lang="fr"] {
    // Your code
}

```

You can also nest them like such:

```
body {
    background-color: orange;

    &[lang="en"] {
       background-color: blue;
    }
}

```

This selector is more specific than just referring to the body tag itself. This means that it will apply the regular body CSS if none of the matching langcode tags are found. You can find more attribute selectors here: <https://www.w3schools.com/css/css_attribute_selectors.asp>
rsangin's answer is the correct one.

If you want to select every language that is not en, you can just use `:not([lang="en"])`