I get for example: 1day ago. What I need is to set for different language, for example for de
. Any suggestion how can I do that?
moment(Date.
To build onto the answer by Gapur, how I got it to work (React native) was like this,
... other imports
import moment from "moment";
import russianLocale from "moment/locale/ru";
import englishLocale from "moment/locale/en-gb";
import chineseLocale from "moment/locale/zh-cn";
const Component = ({ ...props, language }) => {
moment.locale(language);
... logic
// wherever 'moment' is used, it's displayed in
// the language that is indicated by the language prop
... other logic
moment version 2.24.0