• Resolved breinaald

    (@breinaald)


    Hi!

    The website where my team implemented Helpful is available in multiple languages. We’re using Loco Translate to do that. I was wondering if it is possible to translate the parts of Helpful that the user gets to see. For example the message above the pro/contra buttons and the message which is shown around the feedback form.

    When I open Loco Translate I see options for the localization of the Admin parts of Helpful but not for the texts to users. Is there a way to do this easily?

    Thanks for your help!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Pixelbart

    (@pixelbart)

    @breinaald

    Honestly, I don’t know. I should create a XML for WPML so that you can translate that with WPML. But whether that worked, I honestly do not know.

    Maybe there is also a “WPML compatibility” plugin or something for Loco-Translate. So that one can access the WPML XML. Otherwise you would have to build it again…. so you can pull out all the options with get_option and then do e.g. __( get_option(), ‘textdomain’ ), in your functions.php and experiment around like that.

    There are way too many translation plugins unfortunately so I don’t know how they work. With the latest update I’ll try to help you at least a little bit, although I don’t know if this will or can solve your problem. You’ll have to test it out.

    Thanks for your feedback and stay healthy!

    Plugin Author Pixelbart

    (@pixelbart)

    You can create a must use plugin and then set the filter there and override Helpful’s settings.

    Here is an example:

    
    <?php
    add_filter( 'helpful_default_values', function( $values ) {
    	$values['heading'] = __( 'Was this post helpful?', 'helpful-overwritten' );
    	return $values;
    } );
    

    file: /wp-content/mu-plugins/helpful-overwritten.php

    You can create the folder if it doesn’t exist. After that you have to translate the plugin helpful-overwritten inside Loco Translate and apply the “advanced configuration”. But then it should work.

    Thread Starter breinaald

    (@breinaald)

    Thanks so much for the help! Going to try this.

    Cheers

    Thread Starter breinaald

    (@breinaald)

    I just found out that we’re also using WPML. It shows me Stringtranslations for Helpful but they seem to be only of elements in the Adminarea, not the user-facing texts. Do you have info available about using WPML to create translations for user-facing texts?

    Plugin Author Pixelbart

    (@pixelbart)

    @breinaald

    No, I’m afraid I don’t have any information. I don’t use all the plugins and just try to construct solutions. They all work differently.

    With the current solution I gave you above, you can translate the texts. You then have to make the individual options translatable yourself, with a mu-plugin.

    So with the above solution of mine, you can translate the individual texts in the frontend:

    https://wordpress.org/support/topic/localization-of-feedback-form/#post-13987789

    Another solution proposal, I have unfortunately not for you.

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

The topic ‘Localization of Feedback form’ is closed to new replies.