Skip to content

Can't have a page in another language in a non multilingual site (esp a RTL one) #6851

Open
@djay

Description

@djay

Describe the bug

If you set a language other than english in a given page the html "lang" remains in english and no dir="rtl" is set if the language is RTL.

To Reproduce
Steps to reproduce the behavior:

  1. Go to control panel and add arabic as possible language
  2. Go to a page and edit
  3. Go to page catagorisation and set language to arabic
  4. add some arabic text
  5. save
  6. Notice the page language is set to en
  7. Notice the arabic text goes the wrong direction

Expected behavior

In the case where its a single page in another language and not a full translated multilingual site (ie p.a.multilingual installed).
I would expect

  • the html lang to be set to the page language
  • the header and footer to be set to the default site language. since these are unlikely to be translated
  • the content area to be set to the page language and a dir attribute set to the direction of that language

An alternative might be to give the ability of sections of blocks to be set to another language. I'm not sure thats the right way to go as I'm not sure how common it is to mix different languages on one page?

Screenshots
N/A

Software (please complete the following information):

tested with demo.plone.org on 2025-03-20

Additional context

This is the code for the lang attribute is set but not sure yet why its not changing the language.

But I do think a more full solution is needed for the case where its not a full multilingual site.

I couldn't find any code that sets the text direction so I think this is completely missing for p.a.multilingual sites.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions