WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Pontus Lofgren
    Member
    Posted 2 years ago #

    Hi!

    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,

    Regards,

    Pontus

    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 2 years ago by Pontus Lofgren
  • This topic is not resolved
  • WordPress version: 3.3.1