I am in the process of building a multilingual react application and I am looking for a solution to dynamically apply certain CSS styles to most components based on the chosen language. I am seeking something akin to direction-rtl and direction-ltr, which affect all components when applied to the body component. My idea is to assign a class like lang-en to all components and then define specific CSS rules in the component's CSS file that will only be applied when they have the lang-en class. For example, I want to change the background color of all elements with the .rec class to red when the lang-en class is present.
.rec.lang-en {
background-color: red;
}