Skip to content

i18n locales build successfully but always render English content in Docusaurus 3.10 #11952

Closed

Description

@mikailyetkin

Have you read the Contributing Guidelines on issues?

Prerequisites

Description

After upgrading from Docusaurus 3.9.x to 3.10.0, multilingual builds generate locale folders correctly (en, de, fr, etc.), but all generated HTML content is rendered in English regardless of locale translation files.

This worked correctly in 3.9.x with the same content and setup.

Reproducible demo

No response

Steps to reproduce

  1. Configure i18n:
i18n: {
  defaultLocale: 'en',
  locales: ['en', 'de', 'fr'],
}
  1. Docs setup:
    docs/ intro.md (English source)

  2. Translation files:
    i18n/de/docusaurus-plugin-content-docs/default/current/intro.md

  3. Build docusaurus

  4. Inspect output:
    build/de/index.html

Expected behavior

Each locale should render translated content:

/de → German content
/fr → French content

Actual behavior

Locale folders are generated:

build/en
build/de
build/fr
But all HTML content is in English across all locales.
Translation files appear to be ignored or not applied during render phase.

Your environment

  • Docusaurus version used: 3.10.0
  • Environment name and version: Node V22.20.0
  • Operating system and version: Ubuntu 24.04.3 LTS

Self-service

  • I'd be willing to fix this bug myself.

Activity

  1. added
    bug
    status: needs triage
    on Apr 20, 2026
  2. shanisma commented on Apr 22, 2026

    @shanisma

    thanks @mikailyetkin , I have same issue, reverted to 3.9

  3. slorber commented on Apr 27, 2026

    @slorber
    Collaborator

    You can see that our prod website remains translated on v3.10: https://docusaurus.io/fr/

    The repro works, it's just that you used the wrong folder and extension:

    -i18n/de/docusaurus-plugin-content-docs/default/current/intro.md
    +i18n/de/docusaurus-plugin-content-docs/current/intro.mdx

    There has never been a "/default/" plugin ID segment in the docs i18n path.
    We optionally add a -pluginId suffix when using a custom plugin id (!== "default")
    See https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-docs#i18n

    If many of you have i18n problems under 3.10, please:

    • Ensure that your translated files are at the correct location and have the same extension as the original file (if you migrated from .md to .mdx as our release blog post optionally recommends)
    • Create a real runnable repro that demonstrates the problem with a docusaurus.new sandbox

    I'll reopen if a repro is provided and clearly demonstrates the problem

  4. added
    closed: can't repro
    and removed
    status: needs triage
    on Apr 27, 2026
  5. mikailyetkin commented on Apr 27, 2026

    @mikailyetkin
    Author

    i put the wrong path in the ticket by mistake, i was trying to fix it by adding /default and copy pasted that path.
    my path looks like

    i18n/de/docusaurus-plugin-content-docs/current/a-custom-folder/md

  6. slorber commented on Apr 27, 2026

    @slorber
    Collaborator

    You put the wrong path in the first issue, and also the wrong extension. And the path of your last comment is wrong, too.

    That's why we ask for a repro.

    Image

    Please send a repro, or you put the burden on me to guess what you missed, and we all lose time.

  7. mikailyetkin commented on Apr 28, 2026

    @mikailyetkin
    Author

    i couldnt reproduce it with codesandbox, then i started looking into differences, i noticed running write-translations command creates folder with iso local language codes, earlier it was "de" now "de-DE". Since we were creating this folder manually (due to weblate integration) with the name "de" it was not being picked, after changing the folder name to "de-DE" it started to work fine.

    Also had to override webpackbar version due to issue mentioned at #11923

  8. slorber commented on Apr 28, 2026

    @slorber
    Collaborator

    I see, thanks, will investigate the write-translations CLI soon.

    Can you tell me how you run this CLI on your site?

    From what I see we have a backlinked PR from @fgalz to this issue and their site is using the following workflow using the --locale option (which IMHO is not really necessary)

    https://github.com/zaphosting/docs/blob/master/.github/workflows/build-docusaurus.yml#L33

  9. mikailyetkin commented on Apr 29, 2026

    @mikailyetkin
    Author

    in my case i dont use write-translations command at all, we have integrated md files with weblate and translators are using weblate ui to translate, then we have some scripts pulling translated files from weblate and placing it inside i18n folder accordingly. at the beginning of the project setup, i run the write-translations command to see i18n folder structure, and then adopted my scripts accordingly.

  10. slorber commented on Apr 30, 2026

    @slorber
    Collaborator

    i noticed running write-translations command creates folder with iso local language codes, earlier it was "de" now "de-DE".

    Can you please tell me how to reproduce that behavior?

    For us, under v3.10 / main:

    • yarn workspace website write-translations writes in i18n/en
    • yarn workspace website write-translations --locale fr writes in i18n/fr
    • yarn workspace website write-translations --locale de-DE writes in i18n/de-DE

    We didn't change anything related to this CLI between v3.9 and v3.10. I don't see it behaving differently:

    npx --yes [email protected] my-website-v3.9 classic --javascript
    cd my-website-v3.9
    
    yarn workspace website write-translations
    [INFO] 82 translations will be written at "i18n/en/code.json".
    [INFO] 5 translations will be written at "i18n/en/docusaurus-theme-classic/navbar.json".
    [INFO] 10 translations will be written at "i18n/en/docusaurus-theme-classic/footer.json".
    [INFO] 3 translations will be written at "i18n/en/docusaurus-plugin-content-blog/options.json".
    [INFO] 4 translations will be written at "i18n/en/docusaurus-plugin-content-docs/current.json".
    
    yarn workspace website write-translations --locale fr
    [INFO] 82 translations will be written at "i18n/fr/code.json".
    [INFO] 5 translations will be written at "i18n/fr/docusaurus-theme-classic/navbar.json".
    [INFO] 10 translations will be written at "i18n/fr/docusaurus-theme-classic/footer.json".
    [INFO] 3 translations will be written at "i18n/fr/docusaurus-plugin-content-blog/options.json".
    [INFO] 4 translations will be written at "i18n/fr/docusaurus-plugin-content-docs/current.json"
    
    yarn workspace website write-translations --locale de-DE
    [INFO] 82 translations will be written at "i18n/de-DE/code.json".
    [INFO] 5 translations will be written at "i18n/de-DE/docusaurus-theme-classic/navbar.json".
    [INFO] 10 translations will be written at "i18n/de-DE/docusaurus-theme-classic/footer.json".
    [INFO] 3 translations will be written at "i18n/de-DE/docusaurus-plugin-content-blog/options.json".
    [INFO] 4 translations will be written at "i18n/de-DE/docusaurus-plugin-content-docs/current.json".
    
    npx --yes [email protected] my-website-v3.10 classic --javascript
    cd my-website-v3.10
    
    yarn write-translations
    [INFO] 82 translations will be written at "i18n/en/code.json".
    [INFO] 5 translations will be written at "i18n/en/docusaurus-theme-classic/navbar.json".
    [INFO] 10 translations will be written at "i18n/en/docusaurus-theme-classic/footer.json".
    [INFO] 3 translations will be written at "i18n/en/docusaurus-plugin-content-blog/options.json".
    [INFO] 4 translations will be written at "i18n/en/docusaurus-plugin-content-docs/current.json".
    
    
    yarn write-translations --locale fr
    [INFO] 82 translations will be written at "i18n/fr/code.json".
    [INFO] 5 translations will be written at "i18n/fr/docusaurus-theme-classic/navbar.json".
    [INFO] 10 translations will be written at "i18n/fr/docusaurus-theme-classic/footer.json".
    [INFO] 3 translations will be written at "i18n/fr/docusaurus-plugin-content-blog/options.json".
    [INFO] 4 translations will be written at "i18n/fr/docusaurus-plugin-content-docs/current.json".
    
    yarn write-translations --locale de-DE
    [INFO] 82 translations will be written at "i18n/de-DE/code.json".
    [INFO] 5 translations will be written at "i18n/de-DE/docusaurus-theme-classic/navbar.json".
    [INFO] 10 translations will be written at "i18n/de-DE/docusaurus-theme-classic/footer.json".
    [INFO] 3 translations will be written at "i18n/de-DE/docusaurus-plugin-content-blog/options.json".
    [INFO] 4 translations will be written at "i18n/de-DE/docusaurus-plugin-content-docs/current.json".
    
  11. slorber commented on Apr 30, 2026

    @slorber
    Collaborator

    I think I understand, this only happens for sites defining an explicit localeConfigs[<locale>].htmlLang

    Regression coming from #11550

  12. mikailyetkin commented on Apr 30, 2026

    @mikailyetkin
    Author

    i think you are right, i have explicit localeConfigs[<locale>].htmlLang defined in my project.

     (3.10)
    yarn write-translations
    yarn run v1.22.22
    $ docusaurus write-translations
    [INFO] 91 translations will be written at "i18n/en-US/code.json".
    [INFO] 3 translations will be written at "i18n/en-US/docusaurus-theme-classic/navbar.json".
    [INFO] 1 translations will be written at "i18n/en-US/docusaurus-theme-classic/footer.json".
    [INFO] 3 translations will be written at "i18n/en-US/docusaurus-plugin-content-blog/options.json".
    [INFO] 11 translations will be written at "i18n/en-US/docusaurus-plugin-content-docs/current.json".
    
     (3.10)
    yarn write-translations --locale de
    yarn run v1.22.22
    $ docusaurus write-translations --locale de
    [INFO] 91 translations will be written at "i18n/de-DE/code.json".
    [INFO] 3 translations will be written at "i18n/de-DE/docusaurus-theme-classic/navbar.json".
    [INFO] 1 translations will be written at "i18n/de-DE/docusaurus-theme-classic/footer.json".
    [INFO] 3 translations will be written at "i18n/de-DE/docusaurus-plugin-content-blog/options.json".
    [INFO] 11 translations will be written at "i18n/de-DE/docusaurus-plugin-content-docs/current.json".
    
  13. slorber commented on Apr 30, 2026

    @slorber
    Collaborator

    Thanks, we figured it out! 😄

    Fix is already here: #11979

    Will be backported and released in v3.10.1 asap

  14. removed
    closed: can't repro
    on Apr 30, 2026
  15. slorber commented on Apr 30, 2026

    @slorber
    Collaborator
  16. shanisma commented on May 4, 2026

    @shanisma

    Thanks a lot !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions