Visitar URL original
clarify I18nPlugin usage for texts · Issue #4220 · 11ty/buildawesome · GitHub
Skip to content

clarify I18nPlugin usage for texts #4220

Open

Description

@mariusa

Operating system

Linux

Eleventy

3.1.2

Describe the bug

Hi,

At https://www.11ty.dev/docs/plugins/i18n/
please give an example on how to use translated text. eg

  1. create /en/en.json with ....
  2. have this text translated, instead of always english: This page is also available in:

Also, this https://www.11ty.dev/docs/i18n/
lists other plugins (including the confusing eleventy-plugin-i18n which is dead, not updated in 5 years), instead of the built-in i18n plugin.

Thanks

Reproduction Source Code URL

No response

Screenshots

No response

Activity

  1. mariusa commented on Jan 30, 2026

    @mariusa
    Author

    for example, is this correct?

    /en/en.json

    {
      "t": {
          "pageavailable": "This page is also available in",
          "other": "some other text"
      }
    }
    

    then in /en/index.liquid use {{ t.pageavailable }}

    Seems to work, is this the best way? Why not document it?

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions