[wp-polyglots] Common Mistakes

K Suominen ksuominen at gmail.com
Mon Mar 7 16:29:57 GMT 2005


On Mon, 07 Mar 2005 10:31:57 +0100, Stefano <steagl at people.it> wrote:
> Il Mon, 07 Mar 2005 08:38:24 +0100, "Albert Holm"
> <albert+wppoly at cdr.se> scrive:
> 
> >Den 2005-03-07 03:22:29 skrev K Suominen <ksuominen at gmail.com>:
> >
> >> Please use entities when regenerating the fi_FI.mo file, so that it
> >> can be used with both UTF-8 and ISO-8859-1.
> >>
> >
> >Is it possible to use a .mo that is ISO-8859-1 with the admin interface
> >that is UTF-8? Wouldn't a better approach be to maintain the UTF-8
> >translation and then by script change the header and convert it to
> >ISO-8859-1 for those that absolutely refuse to switch to UTF-8?
> 
> This should be a good way, we ftook another approach for it_IT, we
> used only entities, so chars encoding doens't matter, take a bit more
> attention writing the translation, u can't search for accented chars
> in the .mo file unless u use entities too.. but make all play smoothly
> and without wgetting mad about this topic.

This is one of the topics that keep going around in my head...

I think the gettext interface in WP should convert the messages to the
character set that has been entered in the Reading Options page.  This
would allow the mo file to be in UTF-8 (it would *have* to be in a
known charset).

Does the admin interface hard-code UTF-8?  I haven't checked.  It
works well with entities, which might be why I haven't noticed.

There's a problem with entities, too:  the email that goes out is
labeled as text/plain, so entities don't get translated.  I actually
like plain text email, although some of the URL's are a bit long.

The mail messages are also sent out with the charset selected for the
blog, which means the messages need to match.  An automatic conversion
in gettext would fix that, too.

PHP has iconv, hasn't it?  I'd like to look into how this could be
implemented, when I have some more time.

Regards,
+ Kim


More information about the wp-polyglots mailing list