Okay
  Public Ticket #2490934
Translation
Closed

Comments

  • Adrian Ghio started the conversation

    I want to know how to translate the month of calendar to spanish (as you will see at the screenshot)

    Thanks.

  •  2,572
    Aleksandar replied

    Hello Adrian

    This is not possible to achieve with the plugin's built-in features, and it requires some modification. I can give you a guide where to look. First you will need to fetch this file from the link.

    This is an example for German/

    Then go to ../wp-content/plugins/wpdatatables/assets/js/wpdatatables/wdt.funcs.js and around line 148 you will find this code:

    $(this).datetimepicker(
        {
           format: wdtDateFormat,
           showClear: true,
           keepOpen: true,
           useCurrent: false
          }
    

    If you use moment.js then you need to load moment-with-locales.min.js not moment.min.js. Otherwise, your locale: 'de' will not work.

    Then the code should look like this 

    $(this).datetimepicker(
        {
           format: wdtDateFormat,
          showClear: true,
          keepOpen: true,
          useCurrent: false,
          locale: 'de'
    }
    

    Also you have to make a change in file:

    wp-content/plugins/wpdatatables/assets/js/wpdatatables/wdt.frontend.min.js

    It's minified so you must search for 

    $(this).datetimepicker({format:wdtDateFormat,showClear:!0,keepOpen:!0,useCurrent:!1})
    

    and change the code

    $(this).datetimepicker({format:wdtDateFormat,showClear:!0,keepOpen:!0,useCurrent:!1,locale:'de'})

    This is temporary solution, so after the next update these changes will be overwritten, so you have to come back and do it again.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • Adrian Ghio replied

    Aleksandar... how should I do this change?

    "If you use moment.js then you need to load moment-with-locales.min.js not moment.min.js. Otherwise, your locale: 'de' will not work."

  • Adrian Ghio replied

    Aleksandar... another question: you said: "First you will need to fetch this file from the link."

    Which file???

  •  2,572
    Aleksandar replied

    Hello again Adrian

    Here:

    https://github.com/moment/moment/tree/develop/locale

    You need to download the file for your language and overwrite the file here /wp-content/plugins/wpdatatables/assets/js/moment

    Then simply follow the instructions I provided, and you should be able to get it resolved.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • Adrian Ghio replied

    Alek, I´m sorry but I still don´t understand what you mean...

    first of all: wp-content/plugins/wpdatatables/assets/js/moment: there are no files to overwrite in this folder. I just can see one more folder called /locale/. There is already the file es.js.

    Anyway, I copied the file on GIT (es.js) to this folder wp-content/plugins/wpdatatables/assets/js/moment, even I copied to this one: wp-content/plugins/wpdatatables/assets/js/moment/locale and nothing happened.

    One More thing: You said "If you use moment.js then you need to load moment-with-locales.min.js not moment.min.js. Otherwise, your locale: 'de' will not work." How should I do this?


    I really need to fix this and I don´t know so much of coding (that´s why I bought this plugin..."


    I´ll wait for your help.



  •  2,572
    Aleksandar replied

    Hello again Adrian

    Unfortunately, this requires modifying the code, like I explained previously.

    Did you follow the rest of my instructions?

    Since this seems too complicated for you, let's try this:

    The example you see here is for Italian, so please make sure to use the names and abbreviations in Spanish when you access the file.

    Add this code in file under the comments "Apply datetimepicker" in file wp-content/plugins/wpdatatables/assets/js/wpdatatables/wdt.funcs.js around line 147:

    moment.locale('it', {
            months : ["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dezember"],
            monthsShort : ["gen", "feb", "mar", "apr", "mag", "giu", "lug", "ago", "set", "ott", "nov", "dic"],
            weekdaysMin : ["Do", "Lu", "Ma", "Me", "Gi", "Ve", "Sa"],
            week : {
            dow : 1 // Monday is the first day of the week
            }});
    

    And also, around line 160 add " locale: 'it' ", so that segment looks like this:

    6634554782.png

    Then scroll down to around line 196, and add another instance of " locale: 'it' " to the datetimepicker so it looks like this:

    8639887657.png

    Do not forget to add a comma ( , ) after " useCurrent: false " (see screenshots above). If you forget that, this will not work.

    You have to add a line of code in file wp-content/plugins/wpdatatables/source/class.wdttools.php around line 1401:

    wp_enqueue_script('wdt-moment', WDT_JS_PATH . 'moment/locale/it.js', array(), false, true);
    

    So it looks like this:

    4111225442.png

    Please take a look at how it looks on my end after applying these changes:

    4408674740.png
    3679043744.png  

    Please let me know if you were able to achieve the same results.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • Adrian Ghio replied

    Nop!... I did everything you said... step by step.... even with italian, just to do it exactly as you say, but still I don´t get the result....

    Yoo said "wdttools.php, aorund 1401", but file has only 1285 lines... In the screenshots you will see the files...


  •  2,572
    Aleksandar replied

    Hi again Adrian

    Which version of wpDataTables do you have installed? If there are no lines of code past 1285, you must be using an older version of the plugin. The current version is 3.0.1.

    Please download the full version from the email you received when you purchased the plugin (some hostings treat it as Spam, so please check your Spam folder as well). Also, you received an email with credentials for our store https://store.tms-plugins.com/login where you can download the full version fom.

    My suggestion is to update the plugin manually by following these steps:

    1.) Download zip from our store or from the email you received when you purchased the plugin

    2.) Use FTP to open /yourwordpressfolder/wp-content/plugins

    3.) Delete existing wpdatatables folder.

    4.) Upload the previously downloaded wpdatatables folder through FTP into "plugins" folder (unzip it)

    5.)  Go to WP-admin panel, open Plugins section.

    6.) Deactivate wpDataTables Plugin, and then activate it again.

    7.) Clear server and browser cache

    ____________________________________________________________________________________________

    If you are on hosting where you are not allowed to access your FTP, then follow these instructions:

    Please note that, before deleting the plugin from the Plugins page, it is recommended to enable the option "Prevent deleting tables in database" in main settings of the plugin if you want to keep your tables after deletion from the Plugins page. If you uncheck this option, all your tables will be deleted and you will need to create them again.

    1.) Download zip from our store or from the email you received when you purchased the plugin

    2.) Delete wpDataTables plugin from WordPress' Plugins page

    3) Click on Add new in top left of your Plugins page

    4) Click on Upload plugin in top left of your Plugins page

    5.) Choose the previously downloaded wpdatatables.zip file

    6.) When uploading is done, please Activate wpDataTables plugin

    7.) Clear server and browser cache.

    Please note that our plugin is around 14 MB in size, so if you are not able to upload it through WordPress plugins page, you will need to increase the following:

    upload_max_file size, 

    post_max_size,

    max_execution_time

    You should be able to find these values in your php.ini file or on your hosting panel. If you can't find it yourself please ask your hosting provider to provide it.

    After you update the plugin, please provide me:

    • A temporary WP-admin login for your site where this happens
    • FTP access credentials, so I can see the code

    We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course we do not provide login data to third party. You need to translate the calendar into Spanish, correct?

    You can write credentials here just check Private Reply so nobody can see them except us.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • Adrian Ghio replied

    OH ALEK.... You are right.... the actual version I have installed is 2.8.3...

    I really didn´t noticed this.....

    Now, I will update and I will check it again step by step.

    Thanks for your help. I´ll let you know in a few hours.

  • Adrian Ghio replied

    Okay Alek.... I updated the plugin version....

    the firstone solution, didn´t work. Still I see everything in english...


  • Adrian Ghio replied

    Alek, I can confirm it doesn´t work... The first step by step didn´t do anything. The second one, did, but not all....

    At backend it is ok, but in the frontend it doesn´t. The same thing on each version... (2.8.3 and now with 3.0.1)

  •  2,572
    Aleksandar replied

    Hi again Adrian

    Sorry, if it doesn't work on front-end, here's what you can also do:

    Open this file: 

    wp-content/plugins/wpdatatables/assets/js/wpdatatables/wdt.frontend.min.js

    Since this is a minified file, you have to seach for the following line of code:

    $(this).datetimepicker({format:wdtDateFormat,showClear:!0,keepOpen:!0,useCurrent:!1})
    

    and change it to look like this:

    $(this).datetimepicker({format:wdtDateFormat,showClear:!0,keepOpen:!0,useCurrent:!1,locale:'de'})
    

    The last step is to go to main settings of wpDataTables, under Custom JS and CSS  tab, and disable the "Use minified wpDataTables Javascript" check-box.

    This is temporary solution, so after next update this changes will be overwritten so you have to come back and do it again. My advice would be to copy these 3 files to a folder on your desktop for example, so when you update the plugin, you can just copy them over to the installation folder of the plugin.

    Please let me know if it works now.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • Adrian Ghio replied

    Okay Alek... now it works fine...

    so, the step by stepo will be that what you said on  plus "go to main settings of wpDataTables, under Custom JS and CSS  tab, and disable the "Use minified wpDataTables Javascript" check-box"


    Am I ok?

  •  2,572
    Aleksandar replied

    Glad to hear it's working fine now Adrian

    That should be it, if you see the correct dates, that should do fine.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • Adrian Ghio replied

    Hi Alek... I have updated to 3.0.2 version and now it isn´t working the spanish translation.

    I already did step by step exactly as you said, and again I see the months in english.


    WE NEED TO FIX THIS PLEASE!

  •  2,572
    Aleksandar replied

    Hello again Adrian

    You probably missed something when you reapplied the changes.

    Like I said, this isn't something wpDataTables is capable of doing with the built-in features, and after each update these changes will be overwritten, so you have to come back and do it again.

    Verify you made all the changes and that you disabled "Use minified wpDataTables Javascript" check-box.

    If you can't get it to work, I'll need you to provide me FTP credentials and a temporary WP-Admin account.

    Remember this is a public ticket, so if you're going to post any credentials, make sure to enable the PRIVATE response.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables