article

The WordPress TextMate Bundle was just updated to include support for internationalizing strings. Its not terribly obvious how the feature can be used, so I thought that I’d do a quick outline of its features.

The goal of adding this support was to make it as seamless as possible to integrate with your coding style. The command will properly adjust itself for whether your selected text is within a single or double quoted string, it is a quoted string itself, or if it is in a block of HTML instead of PHP.

The command is found under the “Plugin API” section of the plugins menu or by using the command-shift-i keyboard shortcut.

Here it uses the _e() (echoes the result) function instead of the __() (returns the result) function.

And there it is…

So, overall not complicated but super duper handy. I can’t believe that I didn’t think about this earlier. It was just suggested by Mr. Gordon Brander earlier today and I was so giddy to get it implemented here I am on a Friday night getting it worked in!