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

TimeAgo-react not using locale translated in timeago repo #2

Closed
nihaux opened this issue Oct 5, 2016 · 4 comments
Closed

TimeAgo-react not using locale translated in timeago repo #2

nihaux opened this issue Oct 5, 2016 · 4 comments

Comments

@nihaux
Copy link

nihaux commented Oct 5, 2016

Hello,
apparently the timeago-react is unable to find locales that are translated in the timeago repo
<TimeAgo datetime={article.createdAt} locale='zh_CN' />
works but all other languages:

<TimeAgo datetime={article.createdAt} locale='ar' />
<TimeAgo datetime={article.createdAt} locale='fr' />

fallback to english default.

Am i doing sth wrong ?

@hustcc
Copy link
Owner

hustcc commented Oct 10, 2016

Sorry for late. This library has not achieve the API register of timeago.js.

Next version, I will add it, if you have some ideal, welcome to PR.

@hustcc hustcc closed this as completed in da6082a Oct 11, 2016
@hustcc
Copy link
Owner

hustcc commented Oct 11, 2016

v1.0.7@npm can support locale like ar, fr.

all locales here are supported.

demos here.

@nihaux
Copy link
Author

nihaux commented Oct 11, 2016

Thank you ! 👍

github-actions bot pushed a commit that referenced this issue Nov 13, 2019
@y1n0
Copy link

y1n0 commented Dec 10, 2020

Hello, the locales are still not working. even in the demo page. I tried to change the locale in React dev tools and it turned out it only works with vi

Edit: it seems like you have to call timeagojs.register with a locale before it can be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants