JHipster Application Defaults to LTR Instead of RTL for Arabic Language

21 Views Asked by At

I'm working on a simple project using JHipster with React for frontend and have set Arabic as the default language. However, I'm encountering an issue where the site initially loads in Arabic but with LTR (Left-to-Right) orientation. If I reselect Arabic from the language options (even though it's already set to Arabic), the orientation correctly switches to RTL (Right-to-Left).

To address this, I tried modifying the index.html file by setting <html class="no-js" lang="ar-ly" dir="rtl">, intending for the site to default to RTL on the first load. Despite this, when inspecting the page, I notice that it reverts to <html class="no-js" lang="ar-ly" dir="ltr">, suggesting something overrides my settings.

I suspect there might be JavaScript or a configuration within JHipster that dynamically sets the dir attribute based on the selected language, overriding my manual settings in index.html. I've set the title language in JHipster to Arabic, hoping it would enforce RTL, but the issue persists.

Has anyone faced a similar problem, or does anyone know how to ensure the site defaults to RTL orientation for Arabic upon the first load? Any insights or solutions would be greatly appreciated.

Thank you in advance for your help!

0

There are 0 best solutions below