I’ve tried to translate dates from the content manager plugin. I made a file called row.js in a folder extension as explained in the documentation.
When I use the command yarn develop --watch-admin I can see the modification
I’ve juste added .local() and add language in the initstate reducer. return moment(date).locale(language).format(dateFormats[type]);
But when I build it, I don’t see the changes. Any ideas why don’t see changes ?
PS: It would be better to take the language from the strapi-admin select languages. Can I take the state from strapi-admin>languageProvider and use it in strapi-plugin-content-manager (maybe by importing the languageProviderReducer in the combine reducer of the plugin?)
@soupette correct me if I’m wrong but don’t we already convert datetimes over to the users local time? I’m guessing there is a disconnect from the database where it’s set to the local time also but Strapi thinks it’s UTC.
sorry but i don’t get it … I use heroku postgres database where time is set in UTC. Datepicker and the datetime display in the customTable are in english . If I change the language of the backoffice it doesn’t modify the language of the datetime. That’s normal ?
@jeremy when you say “translate the date to another language” do you mean changing the format of the date like in French the 12th of October is written 12/10 whereas in US it’s 10/12 or do you mean changing the timezone?