The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Translating Jetpack Twitter Widget "5 minutes ago" (1 post)

  1. Pontus Lofgren
    Posted 4 years ago #


    Today I installed the Jetpack plugin (http://wordpress.org/extend/plugins/jetpack/ ) 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( "http://twitter.com/{$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.

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 4 years ago by Pontus Lofgren
  • This topic is not resolved
  • WordPress version: 3.3.1