WordPress.org

Ready to get started?Download WordPress

Forums

Tweeple
[resolved] Languages (2 posts)

  1. njackson81
    Member
    Posted 1 year ago #

    In the next one or two updates look at adding language filters. I want to put a hashtag feed up on one of my pages but I want it to be able to pull tweets based on a certain language.

    No problem if this cannot be achieved, it's a suggestion worth trying.

    http://wordpress.org/extend/plugins/tweeple/

  2. Jason (Theme Blvd)
    Member
    Plugin Author

    Posted 1 year ago #

    Hello,

    I'm looking at the search API now, and it does appear you can query the Tweets by language.

    https://dev.twitter.com/docs/api/1.1/get/search/tweets

    However, I am trying to keep the plugin's options as lite as possible, and so I'm not sure something like this would be necessary. Wouldn't, in most cases, your search terms or hashtag being in a certain language bring back results in that language?

    I don't personally do anything outside of English and so I am genuinely asking. Maybe the world outside of English in regards to Twitter is much more cumbersome?

    But assuming the search API on Twitter's dev site is correct, you could filter all of Tweeple query'ing from Twitter like this from your theme's functions.php or your own plugin something like this:

    function my_tweeple_request_params( $params ){
    	$params['lang'] = 'en'; // Your ISO lang code
    	return $params;
    }
    add_filter( 'tweeple_request_params', 'my_tweeple_request_params' );

    https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic