Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
4 tasks
djay opened this issue Mar 21, 2025 · 2 comments
Open
4 tasks
Labels
01 type: bug 30 needs: triage New issue that needs confirmation before work begins

Comments

@djay
Copy link
Member

djay commented Mar 21, 2025

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
  • The title set to default language since you would expect this to appear untranslated in listings and navigation etc

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? Or maybe a container block to set a language in a specific context?

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.

@djay djay added 01 type: bug 30 needs: triage New issue that needs confirmation before work begins labels Mar 21, 2025
superAman07 added a commit to superAman07/volto that referenced this issue Mar 23, 2025
@ranjangupta4590
Copy link

Hi @djay

I would like to work on this issue and contribute a fix. Could you please assign it to me? Let me know if there are any specific guidelines or requirements I should follow.

Thanks!

@stevepiercy
Copy link
Collaborator

@ranjangupta4590 no. Please read and follow First-time contributors, especially Things not to do, Contributing to Plone, and Contributing to Volto.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
01 type: bug 30 needs: triage New issue that needs confirmation before work begins
Projects
None yet
Development

No branches or pull requests

3 participants