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.

    Changing these is possible with this TablePress Extension: https://tablepress.org/extensions/change-datatables-strings/

    Regards,
    Tobias

    Thread Starter eigil-skovgaard

    (@eigil-skovgaard)

    Hi Tobias,
    Think I have followed your installation instruction, but …
    Please take a look here: https://ask4photos.com/kunst-og-illustrationer-art-illustrations/
    Did not change anything in the lang-da_DK.json file as it is fine as is.
    Only, I still get the English texts. What have I missed?
    Regards,
    Eigil

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    ok, from what I can see, your site is using the English package of WordPress (i.e. your admin area is English, right?).

    You will therefore need to tell TablePress to use the Danish translation on the frontend, e.g. by adding an extra parameter to the Shortcode:

    [table id=123 datatables_locale="da_DK" /]

    If you did not make modifications, you should not even need the TablePress Extension then.

    Regards,
    Tobias

    Thread Starter eigil-skovgaard

    (@eigil-skovgaard)

    Hi Tobias,
    Yes, I prefer the admin area to be in English.
    And I thought that the TP Extension would save me from altering the shortcode for each table – i.e. it would override the package language regarding Table Press as a whole. Why else use an extension?
    Regards,
    Eigil

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi Eigil,

    the idea of the Extension is to give users a way to modify the strings in their language.
    You could however also use it to set a default language. For that, just extend it with this PHP code:

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

    With that, you won’t have to use the Shortcode parameter.

    Regards,
    Tobias

    Thread Starter eigil-skovgaard

    (@eigil-skovgaard)

    Hi Tobias,
    Just what I had in mind. And sorry for the delay.
    An appreciation is on its way.
    Best regards,
    Eigil

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

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

    Best wishes,
    Tobias

    P.S.: Maybe this is a chance to take another look at your review? ?? Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How do I change leading texts to another language’ is closed to new replies.