Skip to content

Accessibility: Allow setting default document language for .docx export #1896

@Ovgodd

Description

@Ovgodd

Is your feature request related to a problem? Please describe.
Hello guys ! when exporting a .docx file using @blocknote/xl-docx-exporter, the default language of the document is always set to en-NL.
This causes accessibility issues: screen readers rely on this metadata (<w:themeFontLang w:val="..."/> in settings.xml) to pronounce words correctly based on the language.

Describe the solution you'd like
We’d like to have a way to configure the default language of the generated .docx file, similarly to how the language prop is injected in the PDF exporter (via @react-pdf/renderer).
Ideally, this could be a lang or language field passed in the export options.

Describe alternatives you've considered
Trying to override the default language using default styles.run.lang, but the lang attribute doesn’t influence the main document language or settings.

Additional context
Here is the XML tag in settings.xml that currently defines the default language:

<w:themeFontLang w:val="en-NL"/>
in /packages/xl-docx-exporter/src/docs/template

Bonus
[ ] I'm a sponsor and would appreciate if you could look into this sooner than later 💖

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions