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
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • 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.

https://juristr.com/blog/2019/08/dynamically-load-css-angular-cli/


Thanks

Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(