• I like AddToAny and find it to be an easy and efficient sharing plugin. However there is one functionality it doesn’t support which I would like to use: localisation.

    I’m working on a bilingual site, using WPML. WPML allows translation of widgets, taxonomies, and other theme and plugin text strings using a function called “string translation”. However, the AddToAny widget isn’t written in such a way as to allow WPML to recognise its text for translation.

    The WPML developers provide information for those writing widgets on how to make their widgets translatable on this page. It appears to be very simple; text in widgets needs to go through “apply_filters”. Here is the example they provide:

    function widget( $args, $instance ) {
      extract($args);
      $title = apply_filters( 'widget_title', empty($instance['title']) ? '' : $instance['title'], $instance );
      $text = apply_filters( 'widget_text', $instance['text'], $instance );
    }

    More broadly, it would be great if the whole plugin’s user-facing texts could be localised (eg in the sharing menu, etc). WPML provide support for theme and plugin authors here.

    https://wordpress.org/plugins/add-to-any/

Viewing 1 replies (of 1 total)
  • Plugin Author micropat

    (@micropat)

    Really great feedback for i18/localization, and it will be considered for future AddToAny plugin releases.

Viewing 1 replies (of 1 total)
  • The topic ‘Widget does not support translation with WPML’ is closed to new replies.