• Resolved sergis

    (@sergis)


    Hello! I make everything like here but nothing work for me. I copy file from “i18n/datatables” to “wp-content/plugins/tablepress-change-datatables-strings” lang-lv.json. Tablepress and Change DataTables strings plugins are enabled. Really don’t understand where is the problem.

    Thank you!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks!

    Regards,
    Tobias

    Thread Starter sergis

    (@sergis)

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for the link! It seems like your site is using English as the main language (in the admin area).

    To have all tables in Latvian, please add this to the site’s “functions.php” file:

    add_filter( 'tablepress_table_render_options', sergis_tablepress_use_german_datatables', 10, 2 );
    function sergis_tablepress_use_german_datatables( $render_options, $table ) {
      $render_options['datatables_locale'] = 'lv';
      return $render_options;
    }

    Regards,
    Tobias

    Thread Starter sergis

    (@sergis)

    Tobias something goes wrong. Error 500 and here is image from functions.php

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    oh, sorry, I made a typo in the first line of the code. Please try again with

    add_filter( 'tablepress_table_render_options', 'sergis_tablepress_use_german_datatables', 10, 2 );
    function sergis_tablepress_use_german_datatables( $render_options, $table ) {
      $render_options['datatables_locale'] = 'lv';
      return $render_options;
    }

    Regards,
    Tobias

    Thread Starter sergis

    (@sergis)

    Big thanks you Tobias. Its work now for me.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! 🙂 Good to hear that this helped!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Change DataTables strings’ is closed to new replies.