Right-to-Left support index-rtl

3
when I select the default theme from the settings and once I login with an Arabic user , I will be sent to index-rtl.html while I select any other custom theme and login again with the same arabic user , I will be sent to to index.html rather than index-rtl.html . how can I control directing to index-rtl.html .
asked
8 answers
9

The page to which the client should redirect, must be defined in the particular index file. In the head part of your ltr index file a 'rtlRedirect' property should be defined, as part of the djConfig object:

<script type="text/javascript" src="mxclientsystem/dojo/dojo.js"
    djConfig="
        rtlRedirect: 'index-rtl.html',
        usePlainJson: true
    ">
</script>

The 'rtlRedirect' property determines to which page is redirected if a rtl user signed in (index-rtl.html in this example). In your rtl index file, a 'ltrRedirect' property defines the page to be redirected to if a ltr user signed in (index-ltr.html in this example):

<script type="text/javascript" src="mxclientsystem/dojo/dojo.js"
    djConfig="
        ltrRedirect: 'index-ltr.html',
        usePlainJson: true
    ">
</script>

Of course your theme should support rtl, else you won't notice any differences between the pages. You could use index-default.html and index-rtl.html as an example for your custom theme. Please see https://world.mendix.com/display/Tutorials/Right-to-Left+support for more information about rtl support in your theme.

answered
4

Could you specify what you mean by "selecting any other custom theme"? Do you mean the custom themes from the theme-picker, App Store or a custom theme that you or someone else made?

The themes in the theme-picker and the App Store are not converted for rtl usage. If this is something you want please create a feature request in mxdn.

If someone else built your theme make sure they have properly implemented rtl.

answered
3

As far as I know, the only theme which fully supports RTL is Default (deployment/web/ui/theme-default). If you are creating your own custom theme, I suggest you to use the Default theme as a base for it. Bear in mind that themes and widgets from the AppStore may not support RTL.

answered
2

first I tried to use custom themes from the theme-picker and not converted for rtl usage as you said so I tried to use my custom theme after following the documentation but the problem ,how can I let the server direct me to index-rtl.html instead of index.html

answered
1

I tried to use the ready theme from App store(theme-skyhigh) and when applied the rtl by the same way I found some areas working well and others like menu part and form title are still ltr and not changed . why?

answered
1

I tried to use one of the listed themes in the theme selector (the dark one) and make some changes to support rtl like adding some classes to replace the place of toolbar with the logo item and it works but I found the directions of arrows in the toolbar or in the navigation part of the menu going to the opposite direction (--><--- rather than <--- --->) and I don't know if this related to the (dojoType="mendix.widget.MxToolbar") in the css under the theme of the ( /mxclientsystem/dijit/ ) or should i have to use the only themes which support rtl ?

answered
1

You should override the css class selectors in your own theme. So you should identify the right class with firebug and add those classes in your own theme with your own adjustments.

answered
1

I want to ask if any theme was not designed to support rtl ,there is no way from my side to make it completly support rtl or i have to wait mendix team to update it

answered