Support » Plugins » Translating Jetpack Twitter Widget "5 minutes ago"

  • Hi!

    Today I installed the Jetpack plugin ( ) and started using their Twitter widget.

    It works as a charm except for it being in English. It says: “«My tweet» 4 hours ago” and I’ve been trying a long time to change “4 hours ago” to Swedish. So basically I’de like to translate these English words into these Swedish.

    1 minute – 1 minut
    minutes – minuter
    hour – timme
    hours – timmar
    day – dag
    days – dagar
    week – vecka
    weeks – veckor
    month – månad
    months – månader

    I don’t know PHP very well at all but I’m guessing this is the code that needs to be changed. If I change “minute” into “minut” it will turn out to be written as “minuts”, which is incorrect.

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

    I managed to change “ago” into “sedan” by changing it here:

    echo "<li>{$before_tweet}{$text}{$before_timesince}<a href=\"" . esc_url( "{$account}/statuses/{$tweet_id}" ) . '" class="timesince">' . str_replace( ' ', ' ', wpcom_time_since( strtotime( $created_at ) ) ) . " ago</a></li>\n";

    I would be deeply greatful if somebody could help me out here,



    EDIT: The .po file does not contain translation options for this.

  • The topic ‘Translating Jetpack Twitter Widget "5 minutes ago"’ is closed to new replies.