Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
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