Two problems with my translated theme!

I have been making a Norwegian theme for zenphoto, but I can't find anywhere to translate "Date" and "Image Info". The output for dates on images and albums is now: "Date: April 25th, 2008". Is it possible to print it out like this: "Dato: 25.04.2008" ? The PHP I am using looks like this: <?php printAlbumTitle(); ?></h3> <?php printAlbumDate(); ?> . Also I can't find anywhere to define a translation for "Image Info" - the button that shows EXIF information in a new window.

Comments

  • acrylian Administrator, Developer
    The next version will included translation support for this all. There will be then a tutorial, too.
  • acrylian - But until then (when is it, by the way?), is there a way to translate those two? I was thinking of editing some core files or something. I'm making a website for my 'boss' and I think I'm on a deadline :P

    Edit: And will it be easy to update? I'm soon finished with the site and will be 'delivering' onto the owner, so if it's a hassle then it probably can't be done.
  • acrylian Administrator, Developer
    We don't know when the next version will be out. The coming version will feature gettext for translation.

    Regarding the date I forgot that you of course already can change the display without that now, please take a look here:
    http://www.zenphoto.org/documentation-official/zenphoto/_template-functions.php.html#functiongetImageDate
    http://www.zenphoto.org/documentation-official/zenphoto/_template-functions.php.html#functiongetAlbumDate

    See a php manual for the exact use of these date formats. The next version will use sligthly different ones because of the gettext changes. You can already preview them in the nightly, which already has an option for the date format in the admin.

    For "image info" you would have to search template-functions.php, I guess (don't know right now where that is).
  • I'm still working on the date issue. I read the documentation you linked, but I can't get the formatting of the parameters right. I've tried this:

    <?php printAlbumDate("Dato: d.m.Y"); ?>

    All it does it place itself in front of the original date, like so:

    Dato: d.m.YDecember 3rd, 2006

    I understand that d.m.Y isn't treated as date formatting because it's in the string and I didn't somehow declare that it's supposed to format the date.
    Can you give me an example?
  • I got my problems fixed by looking in template-functions.php and using the same syntax as in there. In fact, the linked functions getImage -and album-date didn't need to be changed. I just changed printImageDate and printAlbumDate instead.
Sign In or Register to comment.