Skip to content

Deault values in t function do not work #2124

@Toto5931

Description

@Toto5931

🐛 Bug Report

Default values in t function do not work

To Reproduce

              t("key1", {count: 0,
			defaultValue_zero: "no item",
			defaultValue_one: "one item",
			defaultValue_other: "{{count}} items",
		})
renders: one item

Expected behavior

It renders "one item" whereas I would have expected zero.
If I put this in a traduction file it works but I want my code to be the source of thruth.

Your Environment

  • runtime version: browser
  • i18next version: 23.7.18
  • os: Windows
  • any other relevant information

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions