Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

How to use react-i18n? #2663

Open
JorensM opened this issue Jun 16, 2023 · 0 comments
Open

How to use react-i18n? #2663

JorensM opened this issue Jun 16, 2023 · 0 comments
Labels
Type: Feature Request 🙌 Request a new feature or changes to an existing one

Comments

@JorensM
Copy link

JorensM commented Jun 16, 2023

Hello, I'm trying to figure out how to use react-i18n.

Specifically, I'm not sure how I'm supposed to link my translation files.

Here is example code:

i18n.formatDate(new Date(order.createdAt), {
  style: DateStyle.Humanize
})

I get the following error:

Missing translation for key: date.humanize.lessThanOneHourAgo in locale: en

Where do I define these translations so I can use i18n.formatDate() ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Feature Request 🙌 Request a new feature or changes to an existing one
Projects
None yet
Development

No branches or pull requests

1 participant