@Wiz
Adding osc_is_rtl function to frontend free / paid plugins with user rtl styles which can be automated with a converter plugin or done online.
Can you be more specific about your idea and conversion?
Right now all rtl related styling is hold by theme.
Our idea was to update html attribute dir to ltr/rtl and let rtl styles be applicable by this attribute, so no extra stylesheet is required.
It's true, theme has RTL styling but only for theme elements and not for plugins ie. pay, blog, invoice, business profile and so many more. They're all LTR even with RTL direction set in head and/or plugin language has been translated. No RTL alignment whatsoever and numbers are reversed!
Consistency is very important.
The idea I'm proposing is expanding the use of osc_is_rtl (new function) or use current osc_locale_is_rtl function across all plugins with frontend/facing user interaction (not all plugins require RTL styling) ie:
if(osc_locale_is_rtl()) {
osc_enqueue_style('bpr-user-rtl-style', osc_base_url() . 'oc-content/plugins/business_profile/css/user-rtl.css?v=' . date('YmdHis'));
}
And use something like
https://github.com/moodlehq/rtlcss-php or a better backend converter or framework that converts on RTL language activation with maybe an option to manually manage CSS styling via the plugin itself (via gui).
I don't recommend adding plugin RTL styling to the theme's RTL styling as it would grow in size, slow things down and users may have 1, 2, all plugins or none at all.
Forgot to add - best part, you'll be saving yourself dev time and time is $$$$