CommentMailer Localization on The Fly

Being one of WordPress localization maintainer, I’m concerned to the fact that WP should be internationally accepted and easily localized into many languages. It applies to plugins too, so I always gettext all WP plugins I ever wrote (unfortunately only 2 of them are fully maintained and available for download here). :)

Lately I’ve been working on my 2nd plugin–commentmailer (currently in ver 0.1)–and found that it needs special i18n treatment. Unlike most plugins that need gettext to localize their appearance on the web page, commentmailer prints the localized strings into an e-mail.

Even as a non-English blog author, sometimes you do need to answer your visitor’s comment in English. More than that, if you are a true polyglot and writes your blog in several languages, you will also have to answer the comment in as many languages as you use. If you use commentmailer plugin to email those answers, you probably want to localize the email depending on the content language.

I’ve provided the localization schema to commentmailer since the first time I released it. But switching which language to use is as painful as changing your WordPress locale environment, unless you are using some multilingual plugin.

So I put some function that makes commentmailer prompt the user (blog author) with an option of which language he/she want to use to answer the visitor’s comment. It searches for commentmailer localization files inside your plugin dir and print a locale selection menu to your comment form.

Here’s what you need to do to take some advantage of this new feature:

  1. Update your commentmailer plugin to the latest version
  2. Use the localization template (commentmailer.pot) included in the distribution file to localize the plugin. Name your localization file (the machine object) commentmailer-[locale].mo and put it directly inside the plugin directory–next to commentmailer.php
  3. Using the corresponding WordPress localization is recommended since it will localize the date format printed in you e-mail
  4. When you are writing a reply in the comment form, select the language in which you are writing
  5. Of course you have to write the comment content in your language to match your preferred locale

10 komentar pada “CommentMailer Localization on The Fly

  • 30 November 2007 pada 22:43
    Permalink

    Waah apaan nih kok bahasanya susah bangeeet. Mantaap tapi kyaknya. Salam kenal yah Mas, kayaknya situ pinter banget. He-he-he.

  • 3 Desember 2007 pada 09:31
    Permalink

    mas, di kedokteran apa di IT to? hehehe….

  • 3 Desember 2007 pada 15:36
    Permalink

    @pudakonline:
    monggo mas, dicoba…

    @Tia:
    yah.. nyambi2 gpp to mbak :D

  • 18 Desember 2007 pada 09:30
    Permalink

    Iya.. dari dulu niatnya mo gitu tapi gak sempat2.. lupa mulu. ntar deh gampang :)

  • 21 Desember 2007 pada 21:59
    Permalink

    You misunderstood me. This is quite possibly one of the BEST plugin ideas EVER. Websites like YouTUbe use a system where if you write a comment, you get an email if your COMMENT gets a reply (NOT THE WHOLE THREAD OF COMMENTS).. just your comment specifically. That is PERFECT… as I don’t like subscribing to a whole thread.. but I do want to be notified if someone replies to me specifically.

    This is what I believe your plugin does, correct?

    I use Brian’s Threaded comments.. so I think it works with that correct?

    But my question was.. there is NO WAY of turning off the send a reply to everybody list. When you turn it off in the plugin, it stays on. It is even there when you are not logged in.

    So in other words.. I believe it is a bug.

    I am using WP 2.3.1

    Thanks,

    Charles

  • 21 Desember 2007 pada 23:10
    Permalink

    Yes, that’s what my plugin does.

    I never use Brian’s Threaded comments.. I guess I’ll test it for interoperability with my plugin and notify you again later

  • 29 Maret 2009 pada 01:37
    Permalink

    mas huda, salam kenal. saya mu tanya mas kenapa ya , blog atau web yang ku buat bisa tampil web orang lain, (salah satu web saya) . gimana mengatasinya, di browser saya pake netcraft itu kelihatan warna merah, untuk blog ini, terkadang saya kehilangan blog tersebut, dan sudah pake domain sendiri. lalu bagaimana mendaftar

Tinggalkan Balasan

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *