gettext best practice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



How do you people best deal with text meant for i18n via gettext, which is
either large or contains HTML tags, or both?

The GNU gettext manual, in section 3.2, recommends to split long texts at
paragraph level, or in the case of long --help screens, in batches of 5-10
lines at most. I can dig this, but I'd still appreciate some feedback.

Formatting, however, is a slightly different issue. The manual seems to have
been written mainly for C users, and as such only deals with spaces, tabs and
newlines.

Of course, structural HTML is a big no-no IMO (ie. the likes of <p>, <li> or
tables). But styling HTML is often needed (<strong>, <em> ...). Am I right in
assuming that a small set of pure style-related HTML should be allowed? I'm
thinking <strong>, <em>, <del> and <ins>. The alternative of replacing them
with %s instead and inserting them in the code on the fly looks like an
attrocity to me.

And allowing any tags still doesn't make me 100% happy; consider borderline
complications due to HTML vs XHTML, or the very principle of separating
content from presentation, which seems to be breached.

And how should <br> be dealt with? Allow it, or go with newlines instead, and
decide in the code if I want to apply a nl2br() or not?

-- 
Romanian Web Developers - http://ROWD.ORG

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux