WordPress.org

Ready to get started?Download WordPress

Forums

Facebook Feed Grabber
Localization (2 posts)

  1. NEkman
    Member
    Posted 2 years ago #

    Hey! Thanks for a very nice plugin!

    However could you please add localization to your plugin? I'd like to translate strings such as "No comments" into my own language.
    Would also be nice with 24-hour time format.

    http://wordpress.org/extend/plugins/facebook-feed-grabber/

  2. bonnerl
    Member
    Plugin Author

    Posted 1 year ago #

    I believe already have all the strings localized… If I'm wrong then I'm not sure where I missed it.
    At this time if you want to make a date/time show up as 24-hour you can edit the facebook.php (not the one in the SDK folder). If you open the file in a text editor and go to line 171. You should find the following:

    // Date formats for event times.
    	public $date_formats = array(
    		// For event dates
    		'event' => array(
    			'today' => '\T\o\d\a\y \a\t g:ia',
    			'this_year' => 'l, F jS \a\t g:ia',
    			'other_year' => 'l, F jS, Y \a\t g:ia',
    		),
    		// For the dates something was posted
    		'feed' => array(
    			'today' => '\T\o\d\a\y \a\t g:ia',
    			'this_year' => 'M jS g:ia',
    			'other_year' => 'M jS, Y g:ia',
    		),
    	);

    The array values in 'today' will apply to any date that is indeed today. 'this_year' any date that is this year and last but not least you have the 'other_year' which you have probably guessed is any year other than this year.

    See Formatting Date and Time for guidance in formatting that these fields.

    You will have to update the facebook.php anytime you update the plugin. I will be releasing an update sometime by the end of the week. When I do the code to update will be on line 195 unless I change stuff before that line between now and then.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic