WYSIWYG Widgets / Widget Blocks
[Plugin: WYSIWYG Widgets] WordPress MultiLingual Support for WYSIWYG Widget? (4 posts)

  1. ralphonz
    Posted 4 years ago #


    First of all thanks for a great plugin. Works really well and saves my clients a lot of hassle :)

    I really need to try to get this plugin to work with WordPress multilingual. They say they are willing to work with any developer who contacts them to make plugins compatible. WordPress Multilingual has proven very reliable for me so far and could be well worth the effort. I'd also imagine it would be a fairly simple task as WPML works using the standard wordpress filters.

    You can contact them here: http://wpml.org/purchase/theme-and-plugin-developers/

    I'd really appreciate the effort.

    Many Thanks



  2. ralphonz
    Posted 4 years ago #

    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

    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...

  3. Danny van Kooten
    Plugin Author

    Posted 4 years ago #

    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.

  4. ralphonz
    Posted 4 years ago #

    Good stuff :) thanks again

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WYSIWYG Widgets / Widget Blocks
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic