mattbradley / livestampjs

A simple, unobtrusive jQuery plugin that provides auto-updating timeago text to your timestamped HTML elements using Moment.js.
http://mattbradley.github.com/livestampjs
MIT License
409 stars 70 forks source link

moment locale #38

Closed ayhansipahi closed 9 years ago

ayhansipahi commented 9 years ago

it would be great if we can set locale inside livestamp.

mattbradley commented 9 years ago

The locale can be changed using the Moment.js i18n functionality. Since different versions of Moment.js have different ways of setting the locale, it would be easier to just use the existing Moment APIs for whatever version is being used instead of Livestamp trying to guess which version is loaded.

micktaiwan commented 5 years ago

Following moment docs

import moment from 'moment';
import 'moment/locale/fr';
moment.locale('fr');

This does not change livestamp's locale