Translation don't works

Hi,

I did install Zenphoto in my site, but my host don't have the gettex support and, now, the brazilian portugueses translation (1.1.6) and the Portugal portuguese translation (1.2), don't works in my Zenphoto. Or better: no one translation works in my site. I did read the Zenphoto translation manual and I did everything write there, but didn't help me. What can I do?

Comments

  • acrylian Administrator, Developer
    I am sorry Zenphoto requires gettext support for translations. Maybe try to ask your host if they can install it for you.
  • It's posible translate the script manually? What the archive?
  • I need translate no more that the basic: comments (comentários, comentar), rating (votar), see galleries (ver galerias), etc...
  • flu Member
    Another trick if you have no other solutions :
    paste in your theme :
    `
    <?php switch (getOption('locale')) {
    default:
    case 'en_US':
    echo 'comments';
    break;
    case 'es_LA':
    echo 'comentar';
    }?>
    `
    adapt it with your locales settings.
  • acrylian Administrator, Developer
    Of course you can also translate the terms you need in your theme directly.
  • acrylian,

    I did translate all my theme, but I don't find the terms "Rating (Total Votes)". Where I find it?
  • There is much more text to be translated than just the strings in your theme files. If you are using plugins, each plugin may need to be translated. Also template functions used may need translation.

    You really should try to convince your ISP to add gettext support to your PHP. If they will not I would seriously consider changing to a better ISP.
  • Yes, sbillard, I agree with you. No questions. I'll resolve this problem in my next step. But in this moment my site is stopped and I need translate the necessary for the moment. You may understand: "all my theme translated", like "all necessary translated".
    -----------------------------------------

    "Rating" is not translatable?

    Please, help me!
  • line 171, image_album_statistics.php.

    I would recommend you invest in a good tool to let you search for these strings in the zenphoto source. You will most likely need it.
  • sbillard,

    The rating don't change and no more works.

    What I did:

    ------------------------------------------

    }
    echo "<p>".sprintf(gettext('Votação: %1$u (Votos: %2$u )'),$rating,$tempalbum->get("total_votes"))."</p>";
    }
    if($showstatistic === "hitcounter" OR $showstatistic === "rating+hitcounter") {
    $hitcounter = $tempalbum->get("hitcounter");
    if(empty($hitcounter)) { $hitcounter = "0"; }
    echo "<p>".sprintf(gettext("Vizualizações: %u"),$hitcounter)."</p>";
    }
    if($showdesc) {
    echo "<p>".my_truncate_string($tempalbum->getDesc(), $desclength)."</p>";
    }
    echo "";
    }
  • Don't use the gettext() function. That is there to allow the text to be translated from the English.
    `echo "

    ".sprintf('Votação: %1$u (Votos: %2$u )',$rating,$tempalbum->get("total_votes"))."

    ";`
Sign In or Register to comment.