Content last modified Monday 6 March 2017
hop to #bottom
Categories:
Author:
uli
About It:
Rate it:
  • Helpful?
  • 0 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

TextBug

Have you ever needed to know some of the language strings that Textpattern or its plugins uses internally? E.g. for customizing your site’s admin language with wet_babble or for hacking plugins or the core and tracing back strings for some steps?

You can see all these strings on the spot: In the admin UI. Just create an empty language:

1. Go to Textpattern’s Language panel and scroll down to the textpack installation area.
2. Copy/paste the code displayed below.

#@admin
#@language gTxt_strings
at_least_one_entry_is => required

3. Press “Upload”.

That’s it. You can now select the “language” you just created from the language chooser, in this case it’d be “gTxt_strings”.

Once you’ve switched to gTxt_strings, all terms created by gTxt are now displayed in TXP-speak, like e.g. tab_write on the Write panel. You can now perform a full text search for tab_write across all Textpattern files and find the file(s) and function(s) it appears in, or search inside any languages’ textpack file and quickly discover the right strings to adapt.

BTW: An indispensable tool for live sites during such periods of language exploration is wet_native which lets you switch only your own admin language to gTxt strings without annoying your co-authors and without potentially changing URLS meanwhile (e.g. the German “kategorie” in URLs doesn’t get altered to the default “category”).

Article Request Count:
Keywords/tags:
Posted here:
02 Jul 2008
Article modified:
27 Apr 2016

Comments/questions? Leave a message in the form.

Your comment will NOT be submitted until you click the 'Submit' button on the next pageload.

Commented (2)

Netcarver:

This is a neat, easy, way to track strings down.

You can also try using the string search features in the MLP pack. But that’s a different story.

Subscribe to this article's comments RSS feed. [ ? ]   View Recent Comments across the site.

You know you want to visit the Archives.

Browse

Categories


Articles

There are also tag clouds, 'cause those are fun.
Published with Textpattern