JLanguage: Difference between revisions
From Joomla! Documentation
New page: <span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki>
</span>
{{Description:JLanguage}}
===Defined in===
l... |
m preparing for archive only |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
===Defined in=== | ===Defined in=== | ||
libraries/joomla/language/language.php | libraries/joomla/language/language.php | ||
| Line 14: | Line 9: | ||
|[[API16:JLanguage/__construct|__construct]] | |[[API16:JLanguage/__construct|__construct]] | ||
|Constructor activating the default information of the language | |Constructor activating the default information of the language | ||
|- | |||
|[[API16:JLanguage/_|_]] | |||
|Translate function, mimics the php gettext (alias _) function | |||
|- | |- | ||
|[[API16:JLanguage/transliterate|transliterate]] | |[[API16:JLanguage/transliterate|transliterate]] | ||
| Line 85: | Line 83: | ||
<source lang="php">jimport( 'joomla.language.language' );</source> | <source lang="php">jimport( 'joomla.language.language' );</source> | ||
===Examples=== | ===Examples=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=JLanguage | category=JLanguage | ||
namespace=CodeExample | |||
category=ClassExample | category=ClassExample | ||
include=* | include=* | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
Latest revision as of 01:52, 25 March 2017
Defined in
libraries/joomla/language/language.php
Methods
| Method name | Description |
|---|---|
| __construct | Constructor activating the default information of the language |
| _ | Translate function, mimics the php gettext (alias _) function |
| transliterate | Transliterate function |
| getTransliterator | Getter for transliteration function |
| setTransliterator | Set the transliteration function |
| load | Loads a single language file and appends the results to the existing strings |
| get | Get a matadata language property |
| getName | Getter for Name |
| getPaths | Get a list of language files that have been loaded |
| getTag | Get for the language tag (as defined in RFC 3066) |
| isRTL | Get the RTL property |
| setDebug | Set the Debug property |
| getDebug | Get the Debug property |
| getDefault | Get the default language code |
| setDefault | Set the default language code |
| getOrphans | Get the list of orphaned strings if being tracked |
| getUsed | Get the list of used strings |
| hasKey | Determines is a key exists |
| setLanguage | Set the language attributes to the given language |
| getInstance | Returns a language object |
| exists | Check if a language exists |
| getMetadata | Returns a associative array holding the metadata |
| getKnownLanguages | Returns a list of known languages for an area |
| getLanguagePath | Get the path to a language |
Importing
jimport( 'joomla.language.language' );
Examples
Code Examples