-1

How to translate date field in Drupal 8?

I am not able to figure out how to translate months of date field into french language .

I have created a view of content news listing in which news content are listed, i have added date field from backend with custom date format (22 may, 2018) in views,enabled translation for date field also created custom date format for both languages, but month are showing in default language english.

By default its showing in english language (jan,feb,march....).

So I just want to translate the months of date fields into french language like April=avril , I am using default core translation module that is provided by Drupal 8.

  • 1
    When you say "I am not able", what does that mean? Please update your question to clarify what you've tried so far. – leymannx Aug 6 '18 at 12:19
  • Sorry for bad english i just want to translate the months of date fields into french language like April=avril ,i am using default core translation module that is provide by drupal 8 – user84266 Aug 6 '18 at 12:30
  • Your English is just fine. Please update your question. Don't drop a comment to clarify. What URL exactly did you visit to translate? Were the strings existent and could translate them? But still not showing the translated value? Have you at least once visited the French version in the front-end? Have you flushed cache? Please update your question. Please provide as much info as you can and don't let us guess or ask back and forth. – leymannx Aug 6 '18 at 12:33
  • 1
    "I am using default core translation module". There is no core Translation module. The relevant core modules are named Language and Interface translations. As far as I know, there is also no way to enable translation for a particular field. Interface translation impact entire site. Update your question and make it clear what you've done to enable translation on your site, otherwise we have no way of knowing what you're actually doing. – Free Radical Aug 6 '18 at 14:12
4

You're not supposed to do this yourself.

What you need to do, is to enable the core Language and Interface translations, select French as the site's language, and update the site's tranlations (this will take some time if its the first time you do this). After doing all that, all long date fields should display the month names in French.

This is how it looks at my siste:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.