IDEMSInternational / open-app-builder

PLH App Frontend
GNU General Public License v3.0
5 stars 24 forks source link

[FEATURE] Accommodate right-to-left languages #2254

Open esmeetewinkel opened 3 months ago

esmeetewinkel commented 3 months ago

What? App to accommodate translations to left-to-right languages. This might involve reflecting the entire screen layout horizontally, e.g.

I'm assuming this would need careful review by someone that has experience with apps in this context and/or can read the relevant left-to-right language.

Why? ParentApp Kids Kuwait is planning to deploy in Arabic, which is left-to-right.

chrismclarke commented 3 months ago

Ionic has a blog post on adding support for RTL, I think the post makes it sound simpler than it actually is as a lot of our custom content has a somewhat hardcoded layout (like you identified with nav buttons), so we might need a bunch of extra styling overrides to accommodate as required

https://ionic.io/blog/ionic-and-rtl

There's also a few good examples in: https://enappd.com/blog/how-to-use-rtl-right-to-left-in-ionic-apps-pwa/152/

jfmcquade commented 2 months ago

A few interesting points here: https://twitter.com/kepano/status/1777813094619840535

chrismclarke commented 2 months ago

Discussed on call, recommend keeping in config (or app_config) a languages property that stores language metadata, such as right-to-left e.g.

languages:{
   en_rtl:{
      rtl: true
  }
}

Then when setting the language should lookup app config in case there's any extra metadata to apply. For initial testing recommend adding an English rtl alternate language to debug repo

esmeetewinkel commented 1 month ago

Issues found post-merge of #2317:

jfmcquade commented 1 month ago

We already have data lists for most deployments that store language metadata, e.g. this language_select template in the minimal sheets folder. Currently I believe this is just used to display the language select options as a radio_button_grid component, but if we're going to have a list of languages and associated metadata (e.g. the syntax suggested in this comment), it may make sense to make this authorable from a named data list sheet rather than directly in the deployment config.