[wp-polyglots] Translation Guidelines / HTML Character Entities

Kimmo Suominen kimmo at global-wire.fi
Tue Sep 4 07:14:11 GMT 2007


Hi!

On Tue, Sep 04, 2007 at 08:03:11AM +0200, Francesc Hervada-Sala wrote:
> 
>   1. .mo files without HTML entities do not work for blogs using other
>      character encodings than UTF-8 (the later being the default and
>      recommended in WP).

Use the Character Set Conversions plugin:

    http://kimmo.suominen.com/sw/charsets/

It assumes that the original messages are translated in UTF-8, per
WordPress guidelines, and will convert them to the user-selected
character set.

>   2. .mo files with HTML entities do not work for e-mail messages sent
>      by wordpress.
>   3. .po files with HTML entites are less translator-friendly and thus
>      more error-prone.

These are the reasons why I agree with the WordPress guideline of using
literal (UTF-8) text in the translations.

Note that 8-bit characters might still not work well with email.  I've
written another plugin for that, called Multibyte Mail:

    http://kimmo.suominen.com/sw/mbmail/

If either plugin needs any enhancements, please let me know.

> As Kim Suominen pointed out on March 7th, 2005, the best solution would 
> be the WP core to translate UTF-8 into the blog's character encoding on 
> runtime (both when generating html and e-mails). See 
> http://comox.textdrive.com/pipermail/wp-polyglots/2005-March/000449.html

I still stand by this.  The functionality of both plugins would be
easy to include in the core, and should not cause any side-effects for
US-ASCII-only bloggers.

However, converting character sets does require the iconv module on PHP4.
Apparently not all hosting providers include the module (even TextDrive
didn't in the beginning).  PHP5 has iconv functions always included.

Since it is trivial to detect missing functions, we could just not try
to convert the character set of messages when the functions are missing.
We could even inform the user about.  (I should probably "put my money
where my mouth is" and implement the check and warning in my plugin.)

Best regards,
+ Kimmo
-- 
<A HREF="http://kimmo.suominen.com/">Kimmo Suominen</A>



More information about the wp-polyglots mailing list