Support » Plugin: WP Datepicker » WPML – Translating months & days names not working?

  • Resolved smartinwp16

    (@smartinwp16)


    Hi,

    We use WP datepicker within contact form 7,
    and we need to have translated months and days names from primary language to secondary English.

    screeenshot – primary language: https://snipboard.io/KCsM1V.jpg

    So, we need to have month / day name for second language translated
    – shown as: “August – Mo – Tu – We – Th …” etc.

    We use WMPL for second language, and I scanned plugin for strings, but it still doesn’t show day & month names: https://paste.pics/DF1XE

    Help on how to resolve this would be highly appreciated.

    Best regards and have a good day!

    • This topic was modified 1 month, 2 weeks ago by smartinwp16.
Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Fahad Mahmood

    (@fahadmahmood)

    WPML works with PHP and these translation strings are hardcoded in javascript files, let me check and update you.

    @smartinwp16 these values are hard coded in JavaScript. You can find the files in

    wp-datepicker\js\i18n

    and can change them. In the screenshot you can see the day names in French.

    For which language are you trying to translate?

    Thread Starter smartinwp16

    (@smartinwp16)

    Current primary language is Croatian,
    and we are doing English version of website – with WPML of course

    – but even the translated version of contact form 7 shows only croatian names for months and days (https://paste.pics/DF1XE)

    (I scanned plugin for strings in WPML, but those names still don’t show in string translation)

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    WPML scans the PHP files while datepicker is using JavaScript files for days, months language translations. You have to manually select the language from datepicker plugin settings page.

    Thread Starter smartinwp16

    (@smartinwp16)

    I did for the primary language – screenshot: https://paste.pics/DFAM7

    But how can we get the english translation to show on English version?

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    It always require to save from settings page like you did. It doesn’t adapt itself according to WPML language selector. I will work on this feature in upcoming versions.

    Thread Starter smartinwp16

    (@smartinwp16)

    Got it, but I can’t change language to English in datepicker settings
    (location MY_WEBSITE/wp-admin/options-general.php?page=wp_dp )

    If I change it to English, It always after refreshing comes back to Croatian. (first chosen language)

    Developer suggested – can you check if there is anything wrong regarding the way the plugin uses get_options?

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    Sure, I will check the get_options usage and will confirm you soon about it.

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    @smartinwp16 we are releasing a new version with these updates.

    Thread Starter smartinwp16

    (@smartinwp16)

    Seems to be working now with new version, changing to EN language now stays in settings.

    Thanks for help!

    Plugin Author Fahad Mahmood

    (@fahadmahmood)

    @smartinwp16 thank you for the confirmation.

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.