egoist / vue-timeago

A timeago component for Vue.
https://vue-timeago.egoist.sh
MIT License
729 stars 104 forks source link

Is there a way to globally change the locale? #95

Closed Burtonium closed 5 years ago

Burtonium commented 5 years ago

It's not very DRY if I override the locale on every instance. Something like this would be great, but maybe not feasible to have all instances update their props.

VueTimeago.locale = 'ja';

zek commented 5 years ago

That would be cool 👍

raisezhang commented 5 years ago

I also need that~

Specific case: Vue & SSR & runInNewContext: false

Thanks ~

egoist commented 5 years ago

:tada: This issue has been resolved in version 5.1.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

egoist commented 5 years ago

https://github.com/egoist/vue-timeago#update-locale-globally This may be what you want.