[wp-polyglots] searching a tutorial on translating a WP theme

Lukáš Kucharczyk kucharczyk.lukas at gmail.com
Thu Sep 21 08:29:09 GMT 2006


Hello!

I'd like to try using the poEdit to create the pot files from a theme
file, but strings in theme files aren't enclosed in __() or _e(). So I
attempted to do it myself, resulting in being stuck with these kind of
strings:

<h2 class="title">Archive for <?php the_time('F jS, Y'); ?></h2>

I know it should be something like this:

<?php echo sprintf(__('Comments in moderation (%s)'),
number_format($numcomments) ); ?>

But could someone help me in this particular case? (the one above)

Regards, Lukas

2006/9/21, Klaus Gena <klausgena at gmail.com>:
> I tried out poedit and it is surprisingly easy to use. I just pointed it to
> the theme folder I wanted to translate (there was no potfile), set the
> keywords (__, _e) and a minute later I could start to translate. The theme I
> use (Sandbox) is now translated (partially) in Dutch (
> http://www.ikenmijnlada.com/wp/2006/09/20/localisatie-van-een-wordpress-theme/).
>
> Thanks
>
>
> On 9/19/06, Arne Brasseur <arne at arnebrasseur.net> wrote:
> >
> >
> > Klaus Gena schreef:
> >
> >
> >
> >
> >
> > Can anyone tell me where can I find a tutorial on translating a WP theme
> (in my case Sandbox) using pot, po and mo-files (and not editing the
> themefiles themselves).
> >
> > Or is this impossible.
> > This depends on wether the theme designer had translation in mind. All
> text in the template files should be enclosed in _(' ... some text ...') or
> _e(' ... some text... ').
> >
> > If this is the case they can be easily translated. You should find a tool
> for your platform to edit po files and convert them to mo files. On linux I
> use poEdit for this.
> >
> > You will first need a pot file for the theme. Either the theme designer
> can supply this, or you can generate it yourself from the template files
> (poEdit can do this).
> >
> > Once you have the pot file and a po/mo tool you can start translating.
> Perhaps if you tell us the platform you are using
> (windows/macintosh/linux/...) the list can give you more specific info.
> >
> > Best regards,
> > Arne
> > --
> > Arne Brasseur @ your service
> > http://www.arnebrasseur.net
arne at arnebrasseur.net
+32/496/94.55.63
> >
> > _______________________________________________
> > wp-polyglots mailing list
> > wp-polyglots at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-polyglots
> >
> >
> >
>
>
>
> --
> Lees Ik en mijn Lada: http://www.ikenmijnlada.com/wp
> Vertalingen Russisch-Nederlands:
> http://klausgena.googlepages.com/home
> Instant Messaging:
> klaus at jabber.org, klausgena at gmail.com
> _______________________________________________
> wp-polyglots mailing list
> wp-polyglots at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-polyglots
>
>
>


More information about the wp-polyglots mailing list