WordPress.org

Support

Support » Plugins and Hacks » [Plugin: WYSIWYG Widgets] WordPress MultiLingual Support for WYSIWYG Widget?

[Plugin: WYSIWYG Widgets] WordPress MultiLingual Support for WYSIWYG Widget?

Viewing 3 replies - 1 through 3 (of 3 total)
  • ralphonz
    Participant

    @ralphonz

    Well I modified a few lines so that WPML would register the strings for translation, It would be great to see it implemented in the next release of WYSIWYG-widgets.

    I edited frontend/WYSIWYG_Widgets_Widget.php

    added:
    icl_register_string('wysiwyg-widgets', 'text-area', $instance['text']);
    to line 43 just under:
    $instance['text'] = stripslashes(wp_filter_post_kses(addslashes($new_instance['text'])));

    and then I changed line 16 to:
    $filteredtext = apply_filters('widget_text', $instance['text'], $instance);
    and then right underneath added:
    $text = icl_t('slideshow-widget', 'text-area', $filteredtext);

    The WPML functions icl_register_string and icl_t should be wrapped in if_function_exists() statements, but hey, i’m lazy and it’ll get overwritten when i update the widget anyway…

    Plugin Author Danny van Kooten
    Participant

    @dvankooten

    Hey Ralph.

    I’ll implement your lines as soon as I find a few spare minutes! 🙂

    As of today WYSIWYG Widgets is on GitHub, if you are too it would be great if you can fork it and then create a pull request with your changes.

    ralphonz
    Participant

    @ralphonz

    Good stuff 🙂 thanks again

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: WYSIWYG Widgets] WordPress MultiLingual Support for WYSIWYG Widget?’ is closed to new replies.