From Joomla! Documentation

The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

JText is a text handling class. JText allows the developer to specify text-fragments in the source-code, which will be translated into the site's language during runtime.

Defined in[edit]



Method name Description
_ Translates a string into the current language.
sprintf Passes a string thru an sprintf.
printf Passes a string thru an printf.
script Translate a string into the current language and stores it in the JavaScript language store.


jimport( 'joomla.methods' );


Code Examples[edit]

Simple text strings

    echo JText::_( 'Welcome' );

see also: http://docs.joomla.org/Tutorial:Template_translations