Support » Plugin: WP Store Locator » Multilingual support with qTranslate

  • Resolved loshberry

    (@loshberry)


    Hi,

    Thank you for the very sleek user interface, it’s working great, except that I am currently developing a multilingual site using qTranslate (http://wordpress.org/plugins/qtranslate/) as the main translation plugin.

    With other plugins, to define dual languages, I can enter the following syntax into the label fields:

    <!--:en-->Search Location<!--:--><!--:zh-->(translated label text)<!--:-->

    (zh is the code for Chinese translation)

    and it will automatically be parsed by qTranslate to display the relevant label according to active language selected.

    However I noticed that your plugin seems to strip all text in the label input fields into plain text, so I can’t enter dual languages into the label fields. Is there a way I can make your plugin work with qTranslate with the said syntax above?

    Thanks in advance for your help! =)

    https://wordpress.org/plugins/wp-store-locator/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    If you are comfortable editing code, you can open the /admin/class-admin.php goto line 686 and change sanitize_text_field( $_POST['wpsl_label'][$label] ) into $_POST['wpsl_label'][$label]. Let me know if this fixes it.

    Thread Starter loshberry

    (@loshberry)

    thanks! with this I managed to get the admin panel to retain the original tags, but on the frontend it displayed the tags directly as text (qTranslate not parsing the tags correctly).

    i managed to get it to work by changing the display code in frontend template: frontend/templates/default.php

    from

    *$output .= '<div><label for="wpsl-search-input">' . esc_html( stripslashes( $this->settings['search_label'] ) ) . '</label></div>' . "\r\n";

    to

    $output .= '<div><label for="wpsl-search-input">' . (__($this->settings['search_label'])) . '</label></div>' . "\r\n";

    unfortunately this only works for this particular field and i suppose i have to change the code for all the fields. if there is an easier way to do this change, would appreciate your help, otherwise, thanks for the tip! =)

    Plugin Author Tijmen Smit

    (@tijmensmit)

    I don’t think there is an easy way to fix this, you would have to change the code for all the fields.

    Thread Starter loshberry

    (@loshberry)

    sure, thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Multilingual support with qTranslate’ is closed to new replies.