dunno if I can edit that page, but here's an update for that section. Please review grammar, spelling etc. before using it!The Joomla! Translation API
Joomla! provides you with a static class named JText. This class has a number of methods but by far the one you will use most is the _ (underscore) method which is a mimic of the gettext shortcut that is built into php. It is used like this:
$title = JText::_( 'Users' );
In the first example, the API will look for an alias in the language file called USERS
. If it finds a match it will return the text associated with that alias and saves the result in the $title variable. If it doesn't find a match, it will simply return the text passed to it: "Users
". In the second example we are using an alias for a long phrase. Note that the text passed to the method is not case sensitive.
In your template files you can use the very same JText class. As with any PHP code used inside templates you need to switch to PHP mode like in the 2nd example above:
This example may generate the following output presuming english
is the active language:
<p>Due to filesystem permission restrictions and PHP Safe Mode restrictions.
For all users to utilize the Joomla! installers an FTP layer exists to handle filesystem manipulation.
Enter an FTP username and password with access to the Joomla! root directory,
this will be the FTP account that handles all filesystem operations when Joomla!
requires FTP access to complete a task.</p>
The two examples above perform exactly the same as the php examples. Note that using the patTemplate tags, we do see the relationship between the alias and the text for long phrases.