title: How I change the dir from LTR to RTL in ionic 4 programmatically
body: <p>I am working on ionic 4 multi-language app English and Arabic so I need when the user switching between langs the layout change! </p>
  
  <p>I was doing this in ionic 3 by <code>platform.setDir('rtl')</code> at <code>onChangLang</code> event </p>
  
  <pre><code>    if (languageId === 'ar') {
        this.platform.setDir('rtl', true);
        this.translate.setDefaultLang(languageId);
  
      } else {
        this.platform.setDir('ltr', true);
        this.translate.setDefaultLang(languageId);
      }
  </code></pre>
  
  <p><strong>But</strong> now in ionic 4 <code>platform.setDir()</code> has been deprecated ( removed ) for whatever reasons and the documentation doesn't include any replacement for <code>platform.setDir()</code> or how to change the <code>dir</code> programmatically!!</p>
  
  <p><strong>So my Question is how to change the layout direction programmatically using typescript like it was on ionic 3?!!</strong> </p>