12 responses to “Protecting text strings from theme upgrades”

  1. Richard H

    You’re so right Justin—there’s not enough “localizable” themes available.

    This is a great tip that I hope more theme authors will pick up on.

    As a programmer a few years back I used this extensively in the software I wrote so that it could be localized for the French and English in bi-lingual Canada.

    There’s no reason localization can’t become the norm in WordPress themes too.

  2. david

    There’s a part of me ready to declare this a very good idea and another part of me that is begging to know how often such a thing would be used.

    It seems to me that this system is as (or more) complicated than changing the theme itself. It also seems that few people are going to be aware of–or terribly interested in–changing most of these variables.

    That said, for users who blog in a language other than the one being used by a–regularly updating–theme author, this could be a GREAT thing.

    I guess the point I’m making is that this strikes me as a rather interesting idea, but not one I’m excited to immediately go and implement.

  3. J Mehmett

    Truely man WP plugin and theme authors ignore the idea of localization which affects the end-users.

    By the way I wonder why WordPress accepts non-standard localization filenames like mycrazylanguage.po as define ('WPLANG', 'mycrazylanguage'); instead of accepting only gettext standards such as en_US.po/en_US.mo or en_EN.po/en_EN.mo defined in WP as define ('WPLANG', 'en_EN');

    Nice tip, JT.

  4. J Mehmett

    I’m not sure why WordPress accepts non-standard localization file names. But, here’s a question. What if WP only accepted standard names and someone wanted to create a site purely based on an Elvish language (Lord of the Rings)?

    Of course that’s why WordPress is independent.

    I do agree though that plugin and theme authors could really help out the community by adding a few extra lines of code to their themes. The average theme wouldn’t have too many strings to change anyway.

    WordPress was designed to help all, and to produce better open source world. Localization is part of better WordPress.

  5. gofree

    Edit : I do want to add that it would be more complicated for first-time users of Poedit though.

    This is what i am going to back off! I have always wonder how to not destroy my already customized theme, but now it seems a bit more work for a noob like me :(

  6. Cool coding tips from around your WordPress community - part 1 — WP Project

    [...] Tadlock talks about theme localization, and reveals how to protect your text strings from theme upgrades. Have you ever wanted to change some text that reads “Continue reading” or “Post written [...]

  7. WordPress Weekend Resources - June 20, 2008 | Theme Lab

    [...] Protecting text strings from theme upgrades – This post by Justin Tadlock goes over how to make your themes translatable. I’ll admit, this is something I do not do with the themes on Theme Lab, but I may start after reading this. [...]

  8. Ptah Dunbar

    This is a pretty cool idea. But the perfectionist in me makes me want to take out the middle man “poedit” and create an interface via PHP for this. hmm…

  9. Kokkekniven

    An interesting thing here, is that it opens doors for guys like me, that writes about life in the kitchen and my “well-known” recipes, with a twist of daily stories.

    I have tried out every single multilanguage plugin there is, but i cant seem to get any of them to work properly! YET.

    With a localized theme it might just be posible and maybe i dont have to post recipes in english elsewhere, but on the “english” site of my blog!-

Leave a Reply

By submitting a comment here you grant this site a perpetual license to reproduce your words and name/web site in attribution.

WordPress-o-Sphere

  • WordPress 2.8 – "Baker"
    WordPress 2.8 adds hundreds of bug fixes, adds cool functions for themes, boasts a new widget API, and makes custom taxonomies easy for end users.
  • WeRockWP
    WeRockWP recognizes and showcases the individuals who contribute much to the WordPress community. These individuals are called WordPress Rockstars.
  • wpazo
    The all-signal, no-noise, source for the best WordPress stuff.
  • BuddyPress 1.0 has arrived
    The long-awaited BuddyPress (a set of plugins that turns a WordPress MU install into a social network) has been officially released.
  • BuddyPress for WordPress (not MU) coming
    It looks like BuddyPress will also be released for normal WordPress installs (not just WPMU).