quasalang icon indicating copy to clipboard operation
quasalang copied to clipboard

Example of language switcher with LocalStorage and RTL language?

Open LiamKarlMitchell opened this issue 2 years ago • 1 comments

Hi Danny,

Trying to use with Arabic, and the Quasar language switcher does not seem to be working.

Wanting to auto detect locale and use if available, but if set by user (stored in LocalStorage) then to use one that is set if possible with a fallback. I have the LocalStorage part working, but the RTL languages like Arabic are still be on the left align rather than rtl.

I have build config with rtl=true in the quasar.conf. It's like its not loading the language pack from Quasar I'm sure i'm doing something wrong just thought I'de ask if you have an example of this kind of language switcher for a recent Quasar version?

LiamKarlMitchell avatar May 01 '22 16:05 LiamKarlMitchell

You might need to dynamically toggle the dir property on the element(s) where the text is displayed (when a rtl language is selected), e.g:

<div dir="rtl">
  <!--
    rtl content
  -->
</div>

dannyconnell avatar May 02 '22 08:05 dannyconnell