Different behaviour of text direction for not logged-in visitors


(Pad Pors) #1

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)


(Jeff Atwood) #2

Not sure, speak to @Simon_Cossar about it perhaps?


(Simon Cossar) #3

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.


(Jeff Atwood) #4

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.


(Simon Cossar) #5

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.


(Jeff Atwood) #6

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