Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example of language switcher with LocalStorage and RTL language? #9

Open
LiamKarlMitchell opened this issue May 1, 2022 · 1 comment

Comments

@LiamKarlMitchell
Copy link

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?

@dannyconnell
Copy link
Owner

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants