Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Angular RTL & Language Switch Metronic 8


i have problem with RTL
i try to use like this

@import "../../../assets/sass/style.scss";

.rtl{
@import "../../../assets/style.bundle.rtl.css";
direction: rtl;
}

and it doesn`t work correctly

the RTL really doesn't work fine even i just use it like this
@import "../../../assets/style.bundle.rtl.css";

please i need solution to use RTL in angular version and switch language to arabic then change direction to RTL


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (1)


Hi Majed,

When you import the rtl.css file, have you removed the style.scss or comment on it?

Please add the below attributes to the HTML tag.


<html direction="rtl" dir="rtl" >


Current approach, the SCSS file is loaded as hardcoded in the /src/styles.scss. We can't add "if" conditions to it. At the moment, there is no way for the lazy load SCSS file.

You can check here for the lazy load style. Lazy load CSS can make the style load with the "if" condition within the Angular typescript codes.





Thanks


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(