API15:JText
From Joomla! Documentation
(Difference between revisions)
(New page: <span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki>
</span>
{{Description:JText}}
===Defined in===
libraries...) |
|||
| Line 11: | Line 11: | ||
!Method name | !Method name | ||
!Description | !Description | ||
| + | |- | ||
| + | |[[API15:JText/_|_]] | ||
| + | |Translates a string into the current language | ||
|- | |- | ||
|[[API15:JText/sprintf|sprintf]] | |[[API15:JText/sprintf|sprintf]] | ||
| Line 21: | Line 24: | ||
|Translate a string into the current language and stores it in the JavaScript language store. | |Translate a string into the current language and stores it in the JavaScript language store. | ||
|} | |} | ||
| + | |||
===Importing=== | ===Importing=== | ||
<source lang="php">jimport( 'joomla.methods' );</source> | <source lang="php">jimport( 'joomla.methods' );</source> | ||
Latest revision as of 12:39, 25 March 2010
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.
[Edit Descripton] 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.
Contents |
[edit] Defined in
libraries/joomla/methods.php
[edit] Methods
| 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. |
[edit] Importing
jimport( 'joomla.methods' );
[edit] Examples
<CodeExamplesForm />

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