Different behaviour of text direction for not logged-in visitors

we have set the discourse language to Persian and so the right to left direction. but for not logged-in visitors the system is in the left to right and non-translated option.

why? because i’ve selected “Allow users to choose their own language interface preference” option so that admin can use the English language (the Persian-translation of admin panel is not understandable).

if I un-select the option (Allow users to choose their own language interface preference), everything is fine. but until we can set better translation, we need this option.

is there a way to keep the landing page for not logged-in users in rtl-direction & Persian? (the
default locale)

1 Like

Not sure, speak to @simon about it perhaps?

The language for non logged in users is being set be their browser’s language preference. My assumption is that Persian speakers will have their browser’s set to Persian. If that’s the case they should be getting the RTL layout of the site in the Persian language. The idea behind this is to make it easier for users to navigate the site before they have logged in.

I assume that when you log out you are getting the LTR layout because your browser is set to English.

Is this behavior behind a site setting boolean? I agree that in almost all cases auto-detecting browser client language and setting it is desirable… but in some rare cases it might not be desirable.

No it’s not. It only applies when ‘allow user locale’ is enabled. Could it be enough to add a description to that setting? Otherwise I’d be happy to add a site setting for it.

1 Like

I think we should have a site setting to enable/disable this behavior, text can be:

automatically change client user interface language based on web browser language headers

… or similar

3 Likes