Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 5 replies, has 2 voices.

Last updated by eugeneM-3 4 years, 6 months ago.

Assisted by: Bruno.

Author Posts
October 15, 2019 at 5:56 pm #4759555

eugeneM-3

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.

Screenshot 2019-10-15 13.47.50.png
Screenshot 2019-10-15 13.42.03.png
Screenshot 2019-10-15 13.40.51.png
October 15, 2019 at 10:11 pm #4760671

Bruno

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

<wpml-config>
    <admin-texts>
        <key name="et_divi">
            <key name="divi_date_format" />
      </key>
    </admin-texts>
</wpml-config>

- 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.

divi-date.png
October 16, 2019 at 1:20 am #4760869

eugeneM-3

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.

BN6PolMWJu.png
October 16, 2019 at 1:51 pm #4766279

Bruno

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.

*** Note: Please make a full backup of your site.

Privacy and Security when Providing Debug Information for Support: https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

Thank you.

October 16, 2019 at 6:26 pm #4768029

Bruno

Hi,

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.

Thank you.

divi-date-module.png
divi-date-module-fr.png
October 16, 2019 at 6:31 pm #4768077

eugeneM-3

That's perfect, thanks so much! I didn't realize the modules could be edited in each language. Makes sense now 🙂

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.