I'm trying to have the date format on French language posts to be different than English language posts. English is "F j, Y" (Oct 15, 2019). French should be "j f Y" (i.e. 15 oct 2019). Right now, the month is being translated, but the format doesn't change, i.e. it says "Août 15, 2019" (see screenshot), but it should be "15 août 2019".
I've tried changing the data format in the general WordPress settings, but that doesn't change anything. If I change the format in the Divi blog module (see screenshot), that changes it, but it makes it the same for all languages.
I tried searching for "date" or "F j, Y" in the String Translations (see screenshot). I put in "j F Y" as a transation on the items that were listed, but it doesn't seem to make a difference.
Thank you for contacting us. As Divi is using a non-default register, then it would be necessary to change the string representing the date set within Divi's configuration. For this, please follow the steps below:
- Click on the WPML > Settings > Custom XML Configuration
- Insert these lines
- Click on the Save button
- Click on the WPML > String Translation
- Translate the date as desired under the "divi_date_format". I will attach a picture for you to see.
By following these steps, can you translate the date format as desired?
Thank you for the quick response! I added in the code and the translation, but it didn't seem to have any effect. The date format still looks the same on the French side. Screenshot attached of what my string translation page looks like now.
Thank you. Is your site or server using any type of cache? If so, have you cleared the cache to test?
If the problem persists, I'll need to request temporary access (wp-admin and FTP) to your site - preferably to a test site where the problem has been replicated if possible - in order to be of better help.
You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.
Note:
*** Please, can I install the Duplicator plugin (or All in One Migration) to make a copy of your site and install it on my test environment? This will help me debug the problem.
Thank you. I initially thought you were setting this in the general Divi setup, so I suggested the previous code. I noticed that this problem seems to be happening because you are loading the blog module within the page with a specific configuration. I will attach a picture for you to see.
As this is being used within a page, then the translation should not be done by String Translation. To fix this problem, you should follow the steps below:
- Click on the Pages > All Pages
- Click to edit the Blog page
- Switch to the secondary language using the language selector at the top
- Click to edit the "Blog" module
- Edit the date format
For French, I already added the "j F Y" code. Please, let me know if I can help with any other questions you may have about it. I'll be happy to help.