WordPress.org

Ready to get started?Download WordPress

Forums

Simple Ajax Chat
[resolved] Plugin translation (6 posts)

  1. molina_wind
    Member
    Posted 1 year ago #

    Hi,
    I'm translating the plugin into spanish by modifying code. Everything is already translated unless the "4 minutes ago" text. Where can I edit this?
    Thanks in advance

    http://wordpress.org/plugins/simple-ajax-chat/

  2. Jeff Starr
    Member
    Plugin Author

    Posted 1 year ago #

    That's in the JavaScript file (I think..) - will have to investigate if it's translatable or not..

  3. molina_wind
    Member
    Posted 1 year ago #

    Thanks for your help Jeff.
    I found something in "simple-ajax-chat-form.php"

    I edit this way:

    <div id="sac-latest-message"><span><?php _e('Último mensaje:', 'sac'); ?></span> <em id="responseTime"> hace <?php echo sac_time_since($r->time); ?></div>
    <ul id="sac-messages">

    So text in now PARTIALLY in spanish before sending a message. But once a message is sent I have the "0 minutes ago" text again.

  4. molina_wind
    Member
    Posted 1 year ago #

    I guess I did it editing:
    "simple-ajax-chat-core.php"

    // time since entry
    function sac_time_since($original) {
    $chunks = array( // unix time (segundos)
    array(60 * 60 * 24 * 365 , 'año'),
    array(60 * 60 * 24 * 30 , 'mes'),
    array(60 * 60 * 24 * 7, 'semana'),
    array(60 * 60 * 24 , 'día'),
    array(60 * 60 , 'hora'),
    array(60 , 'minuto'),

    I still need to find how to modify "ago" word showed after message is published.

  5. molina_wind
    Member
    Posted 1 year ago #

    Done!

    $loop = $id ."---" . $name . "---" . $text . "---" . sac_time_since($time) . " atrás---" . $url . "---";

    Hope this custom solutions helps someone else.

  6. Jeff Starr
    Member
    Plugin Author

    Posted 9 months ago #

    These are all localized in the latest version of the plugin (20131105). Cheers!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.