[wp-hackers] Fwd: Some more i18n

Ryan Boren ryan at boren.nu
Fri Jan 14 16:46:30 GMT 2005


On Fri, 2005-01-14 at 09:22 -0700, Randy Peterman wrote:
> Matthew Mullenweg wrote:
> 
> > jens persson wrote:
> >
> >> It's mostly adding __() and _e() calls to kubrik, but also some changes
> >> from sting concatenation to printf calls making the strings easier to
> >> translate and in a few places I changed the messages to get better
> >> consistency.
> >
> >
> > We're leaning towards not cluttering the templates with localization 
> > calls anymore, rather just distributing pre-localized templates with 
> > the pre-localized downloads we plan on doing. Having all of the text 
> > in a template inside <?php ?> tags can be pretty intimidating for new 
> > users.
> >
> That's a smart, user-friendly plan.  I wish I could do this with all of 
> the i18n stuff I've got to do :)

Here's an example of how unfriendly it can be.

This text in sidebar.php...

                       <p>You are currently browsing the <a href="<?php
echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a>
weblog archives for the '<?php echo single_cat_title(); ?>'
category.</p>

Becomes this monster:

                       <p><?php printf( __('You are currently browsing
the %1$s weblog archives for the \'%2$s\' category.'), '<a href="' .
get_settings('siteurl') .'">' . get_bloginfo('name') . '</a>',
single_cat_title('', false) ) ?></p>




More information about the hackers mailing list