Difference between revisions of "JLanguage"
From Joomla! Documentation
(Layout updates) |
(Updated to r1448:247ba8d88526) |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
+ | =={{JVer|11.1}} JLanguage== | ||
+ | ===Description=== | ||
+ | {{Description:JLanguage}} | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
<nowiki>[</nowiki>[[Description:JLanguage|Edit Descripton]]<nowiki>]</nowiki> | <nowiki>[</nowiki>[[Description:JLanguage|Edit Descripton]]<nowiki>]</nowiki> | ||
</span> | </span> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
===Methods=== | ===Methods=== | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
|- | |- | ||
+ | !Visibility | ||
!Method name | !Method name | ||
!Description | !Description | ||
|- | |- | ||
+ | |public | ||
|[[JLanguage::_/11.1|_]] | |[[JLanguage::_/11.1|_]] | ||
|Translate function, mimics the php gettext (alias _) function. | |Translate function, mimics the php gettext (alias _) function. | ||
|- | |- | ||
+ | |public | ||
|[[JLanguage::__construct/11.1|__construct]] | |[[JLanguage::__construct/11.1|__construct]] | ||
|Constructor activating the default information of the language. | |Constructor activating the default information of the language. | ||
|- | |- | ||
+ | |public | ||
|[[JLanguage::get/11.1|get]] | |[[JLanguage::get/11.1|get]] | ||
− | |Get a | + | |Get a metadata language property. |
|- | |- | ||
+ | |public | ||
|[[JLanguage::getDebug/11.1|getDebug]] | |[[JLanguage::getDebug/11.1|getDebug]] | ||
|Get the Debug property. | |Get the Debug property. | ||
|- | |- | ||
+ | |public | ||
|[[JLanguage::getDefault/11.1|getDefault]] | |[[JLanguage::getDefault/11.1|getDefault]] | ||
|Get the default language code. | |Get the default language code. | ||
|- | |- | ||
+ | |public | ||
|[[JLanguage::getErrorFiles/11.1|getErrorFiles]] | |[[JLanguage::getErrorFiles/11.1|getErrorFiles]] | ||
|Get a list of language files that are in error state. | |Get a list of language files that are in error state. | ||
|- | |- | ||
+ | |public | ||
|[[JLanguage::getFirstDay/11.1|getFirstDay]] | |[[JLanguage::getFirstDay/11.1|getFirstDay]] | ||
|Get the first day of the week for this language. | |Get the first day of the week for this language. | ||
|- | |- | ||
+ | |public | ||
|[[JLanguage::getIgnoredSearchWords/11.1|getIgnoredSearchWords]] | |[[JLanguage::getIgnoredSearchWords/11.1|getIgnoredSearchWords]] | ||
|getIgnoredSearchWords function | |getIgnoredSearchWords function | ||
|- | |- | ||
+ | |public | ||
|[[JLanguage::getIgnoredSearchWordsCallback/11.1|getIgnoredSearchWordsCallback]] | |[[JLanguage::getIgnoredSearchWordsCallback/11.1|getIgnoredSearchWordsCallback]] | ||
|Getter for ignoredSearchWordsCallback function. | |Getter for ignoredSearchWordsCallback function. | ||
|- | |- | ||
+ | |public | ||
|[[JLanguage::getLocale/11.1|getLocale]] | |[[JLanguage::getLocale/11.1|getLocale]] | ||
|Get the language locale based on current language. | |Get the language locale based on current language. | ||
|- | |- | ||
+ | |public | ||
|[[JLanguage::getLowerLimitSearchWord/11.1|getLowerLimitSearchWord]] | |[[JLanguage::getLowerLimitSearchWord/11.1|getLowerLimitSearchWord]] | ||
|getLowerLimitSearchWord function | |getLowerLimitSearchWord function | ||
|- | |- | ||
+ | |public | ||
|[[JLanguage::getLowerLimitSearchWordCallback/11.1|getLowerLimitSearchWordCallback]] | |[[JLanguage::getLowerLimitSearchWordCallback/11.1|getLowerLimitSearchWordCallback]] | ||
|Getter for lowerLimitSearchWordCallback function. | |Getter for lowerLimitSearchWordCallback function. | ||
|- | |- | ||
+ | |public | ||
|[[JLanguage::getName/11.1|getName]] | |[[JLanguage::getName/11.1|getName]] | ||
|Getter for Name. | |Getter for Name. | ||
|- | |- | ||
+ | |public | ||
|[[JLanguage::getOrphans/11.1|getOrphans]] | |[[JLanguage::getOrphans/11.1|getOrphans]] | ||
|Get the list of orphaned strings if being tracked. | |Get the list of orphaned strings if being tracked. | ||
|- | |- | ||
+ | |public | ||
|[[JLanguage::getPaths/11.1|getPaths]] | |[[JLanguage::getPaths/11.1|getPaths]] | ||
|Get a list of language files that have been loaded. | |Get a list of language files that have been loaded. | ||
|- | |- | ||
+ | |public | ||
+ | |[[JLanguage::getPluralSufficesCallback/11.1|getPluralSufficesCallback]] | ||
+ | |Getter for pluralSuffixesCallback function. | ||
+ | |- | ||
+ | |public | ||
|[[JLanguage::getPluralSuffixes/11.1|getPluralSuffixes]] | |[[JLanguage::getPluralSuffixes/11.1|getPluralSuffixes]] | ||
|pluralSuffixes function | |pluralSuffixes function | ||
|- | |- | ||
+ | |public | ||
|[[JLanguage::getPluralSuffixesCallback/11.1|getPluralSuffixesCallback]] | |[[JLanguage::getPluralSuffixesCallback/11.1|getPluralSuffixesCallback]] | ||
− | |Getter for | + | |Getter for pluralSuffixesCallback function. |
|- | |- | ||
+ | |public | ||
|[[JLanguage::getSearchDisplayedCharactersNumber/11.1|getSearchDisplayedCharactersNumber]] | |[[JLanguage::getSearchDisplayedCharactersNumber/11.1|getSearchDisplayedCharactersNumber]] | ||
|getSearchDisplayedCharactersNumber function | |getSearchDisplayedCharactersNumber function | ||
|- | |- | ||
+ | |public | ||
|[[JLanguage::getSearchDisplayedCharactersNumberCallback/11.1|getSearchDisplayedCharactersNumberCallback]] | |[[JLanguage::getSearchDisplayedCharactersNumberCallback/11.1|getSearchDisplayedCharactersNumberCallback]] | ||
|Getter for searchDisplayedCharactersNumberCallback function. | |Getter for searchDisplayedCharactersNumberCallback function. | ||
|- | |- | ||
+ | |public | ||
|[[JLanguage::getTag/11.1|getTag]] | |[[JLanguage::getTag/11.1|getTag]] | ||
− | | | + | |Getter for the language tag (as defined in RFC 3066). |
|- | |- | ||
+ | |public | ||
|[[JLanguage::getTransliterator/11.1|getTransliterator]] | |[[JLanguage::getTransliterator/11.1|getTransliterator]] | ||
|Getter for transliteration function. | |Getter for transliteration function. | ||
|- | |- | ||
+ | |public | ||
|[[JLanguage::getUpperLimitSearchWord/11.1|getUpperLimitSearchWord]] | |[[JLanguage::getUpperLimitSearchWord/11.1|getUpperLimitSearchWord]] | ||
|getUpperLimitSearchWord function | |getUpperLimitSearchWord function | ||
|- | |- | ||
+ | |public | ||
|[[JLanguage::getUpperLimitSearchWordCallback/11.1|getUpperLimitSearchWordCallback]] | |[[JLanguage::getUpperLimitSearchWordCallback/11.1|getUpperLimitSearchWordCallback]] | ||
|Getter for upperLimitSearchWordCallback function. | |Getter for upperLimitSearchWordCallback function. | ||
|- | |- | ||
+ | |public | ||
|[[JLanguage::getUsed/11.1|getUsed]] | |[[JLanguage::getUsed/11.1|getUsed]] | ||
|Get the list of used strings. | |Get the list of used strings. | ||
|- | |- | ||
+ | |public | ||
|[[JLanguage::hasKey/11.1|hasKey]] | |[[JLanguage::hasKey/11.1|hasKey]] | ||
|Determines is a key exists. | |Determines is a key exists. | ||
|- | |- | ||
+ | |public | ||
|[[JLanguage::isRTL/11.1|isRTL]] | |[[JLanguage::isRTL/11.1|isRTL]] | ||
|Get the RTL property. | |Get the RTL property. | ||
|- | |- | ||
+ | |public | ||
|[[JLanguage::load/11.1|load]] | |[[JLanguage::load/11.1|load]] | ||
|Loads a single language file and appends the results to the existing strings. | |Loads a single language file and appends the results to the existing strings. | ||
|- | |- | ||
+ | |public | ||
|[[JLanguage::setDebug/11.1|setDebug]] | |[[JLanguage::setDebug/11.1|setDebug]] | ||
|Set the Debug property. | |Set the Debug property. | ||
|- | |- | ||
+ | |public | ||
|[[JLanguage::setDefault/11.1|setDefault]] | |[[JLanguage::setDefault/11.1|setDefault]] | ||
|Set the default language code. | |Set the default language code. | ||
|- | |- | ||
+ | |public | ||
|[[JLanguage::setIgnoredSearchWordsCallback/11.1|setIgnoredSearchWordsCallback]] | |[[JLanguage::setIgnoredSearchWordsCallback/11.1|setIgnoredSearchWordsCallback]] | ||
|Setter for the ignoredSearchWordsCallback function. | |Setter for the ignoredSearchWordsCallback function. | ||
|- | |- | ||
+ | |public | ||
|[[JLanguage::setLanguage/11.1|setLanguage]] | |[[JLanguage::setLanguage/11.1|setLanguage]] | ||
|Set the language attributes to the given language. | |Set the language attributes to the given language. | ||
|- | |- | ||
+ | |public | ||
|[[JLanguage::setLowerLimitSearchWordCallback/11.1|setLowerLimitSearchWordCallback]] | |[[JLanguage::setLowerLimitSearchWordCallback/11.1|setLowerLimitSearchWordCallback]] | ||
|Setter for the lowerLimitSearchWordCallback function. | |Setter for the lowerLimitSearchWordCallback function. | ||
|- | |- | ||
− | |[[JLanguage:: | + | |public |
− | |Set the | + | |[[JLanguage::setPluralSuffixesCallback/11.1|setPluralSuffixesCallback]] |
+ | |Set the pluralSuffixes function. | ||
|- | |- | ||
+ | |public | ||
|[[JLanguage::setSearchDisplayedCharactersNumberCallback/11.1|setSearchDisplayedCharactersNumberCallback]] | |[[JLanguage::setSearchDisplayedCharactersNumberCallback/11.1|setSearchDisplayedCharactersNumberCallback]] | ||
|Setter for the searchDisplayedCharactersNumberCallback function. | |Setter for the searchDisplayedCharactersNumberCallback function. | ||
|- | |- | ||
+ | |public | ||
|[[JLanguage::setTransliterator/11.1|setTransliterator]] | |[[JLanguage::setTransliterator/11.1|setTransliterator]] | ||
|Set the transliteration function. | |Set the transliteration function. | ||
|- | |- | ||
+ | |public | ||
|[[JLanguage::setUpperLimitSearchWordCallback/11.1|setUpperLimitSearchWordCallback]] | |[[JLanguage::setUpperLimitSearchWordCallback/11.1|setUpperLimitSearchWordCallback]] | ||
|Setter for the upperLimitSearchWordCallback function. | |Setter for the upperLimitSearchWordCallback function. | ||
|- | |- | ||
+ | |public | ||
|[[JLanguage::transliterate/11.1|transliterate]] | |[[JLanguage::transliterate/11.1|transliterate]] | ||
|Transliterate function. | |Transliterate function. | ||
|- | |- | ||
+ | |public static | ||
|[[JLanguage::_parseLanguageFiles/11.1|_parseLanguageFiles]] | |[[JLanguage::_parseLanguageFiles/11.1|_parseLanguageFiles]] | ||
|Searches for language directories within a certain base dir. | |Searches for language directories within a certain base dir. | ||
|- | |- | ||
+ | |public static | ||
|[[JLanguage::_parseXMLLanguageFile/11.1|_parseXMLLanguageFile]] | |[[JLanguage::_parseXMLLanguageFile/11.1|_parseXMLLanguageFile]] | ||
|Parse XML file for language information. | |Parse XML file for language information. | ||
|- | |- | ||
+ | |public static | ||
|[[JLanguage::_parseXMLLanguageFiles/11.1|_parseXMLLanguageFiles]] | |[[JLanguage::_parseXMLLanguageFiles/11.1|_parseXMLLanguageFiles]] | ||
|Parses XML files for language information. | |Parses XML files for language information. | ||
|- | |- | ||
+ | |public static | ||
|[[JLanguage::exists/11.1|exists]] | |[[JLanguage::exists/11.1|exists]] | ||
|Check if a language exists. | |Check if a language exists. | ||
|- | |- | ||
+ | |public static | ||
|[[JLanguage::getInstance/11.1|getInstance]] | |[[JLanguage::getInstance/11.1|getInstance]] | ||
|Returns a language object. | |Returns a language object. | ||
|- | |- | ||
+ | |public static | ||
|[[JLanguage::getKnownLanguages/11.1|getKnownLanguages]] | |[[JLanguage::getKnownLanguages/11.1|getKnownLanguages]] | ||
|Returns a list of known languages for an area. | |Returns a list of known languages for an area. | ||
|- | |- | ||
+ | |public static | ||
|[[JLanguage::getLanguagePath/11.1|getLanguagePath]] | |[[JLanguage::getLanguagePath/11.1|getLanguagePath]] | ||
|Get the path to a language. | |Get the path to a language. | ||
|- | |- | ||
+ | |public static | ||
|[[JLanguage::getMetadata/11.1|getMetadata]] | |[[JLanguage::getMetadata/11.1|getMetadata]] | ||
|Returns a associative array holding the metadata. | |Returns a associative array holding the metadata. | ||
|- | |- | ||
+ | |public static | ||
|[[JLanguage::parseLanguageFiles/11.1|parseLanguageFiles]] | |[[JLanguage::parseLanguageFiles/11.1|parseLanguageFiles]] | ||
|Searches for language directories within a certain base dir. | |Searches for language directories within a certain base dir. | ||
|- | |- | ||
+ | |public static | ||
|[[JLanguage::parseXMLLanguageFile/11.1|parseXMLLanguageFile]] | |[[JLanguage::parseXMLLanguageFile/11.1|parseXMLLanguageFile]] | ||
|Parse XML file for language information. | |Parse XML file for language information. | ||
|- | |- | ||
+ | |public static | ||
|[[JLanguage::parseXMLLanguageFiles/11.1|parseXMLLanguageFiles]] | |[[JLanguage::parseXMLLanguageFiles/11.1|parseXMLLanguageFiles]] | ||
|Parses XML files for language information. | |Parses XML files for language information. | ||
|- | |- | ||
+ | |protected | ||
|[[JLanguage::getCallerInfo/11.1|getCallerInfo]] | |[[JLanguage::getCallerInfo/11.1|getCallerInfo]] | ||
|Determine who called or . | |Determine who called or . | ||
|- | |- | ||
+ | |protected | ||
|[[JLanguage::loadLanguage/11.1|loadLanguage]] | |[[JLanguage::loadLanguage/11.1|loadLanguage]] | ||
|Loads a language file. | |Loads a language file. | ||
|- | |- | ||
+ | |protected | ||
|[[JLanguage::parse/11.1|parse]] | |[[JLanguage::parse/11.1|parse]] | ||
|Parses a language file. | |Parses a language file. | ||
|- | |- | ||
|} | |} | ||
+ | * '''Defined in''' libraries/joomla/language/language.php | ||
+ | * '''Extends''' [[JObject/11.1|JObject]] | ||
===Importing=== | ===Importing=== | ||
<source lang="php">jimport( 'joomla.language.language' );</source> | <source lang="php">jimport( 'joomla.language.language' );</source> | ||
===See also=== | ===See also=== | ||
− | * JLanguage source code | + | * {{JVer|11.1}} '''JLanguage source code''' on [[jplatform:language/language.php|BitBucket]] |
− | * [[JLanguage|Other versions of | + | * {{JVer|11.1}} Subpackage [[Subpackage Language/11.1|Language]] |
+ | * [[JLanguage|Other versions of JLanguage]] | ||
{{SeeAlso:JLanguage}} | {{SeeAlso:JLanguage}} | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
<nowiki>[</nowiki>[[SeeAlso:JLanguage|Edit See Also]]<nowiki>]</nowiki> | <nowiki>[</nowiki>[[SeeAlso:JLanguage|Edit See Also]]<nowiki>]</nowiki> | ||
</span> | </span> | ||
− | === | + | ===User contributed notes=== |
<CodeExamplesForm /> | <CodeExamplesForm /> | ||
<dpl> | <dpl> | ||
Line 189: | Line 242: | ||
category=ClassExample | category=ClassExample | ||
include=* | include=* | ||
+ | namespace=CodeExample | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
<noinclude>[[Category:Platform]][[Category:Platform 11.1]][[Category:JLanguage]]</noinclude> | <noinclude>[[Category:Platform]][[Category:Platform 11.1]][[Category:JLanguage]]</noinclude> |
Revision as of 18:05, 27 April 2011
The "API17" 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.
JLanguage[edit]
Description[edit]
Template:Description:JLanguage [Edit Descripton]
Methods[edit]
Visibility | Method name | Description |
---|---|---|
public | _ | Translate function, mimics the php gettext (alias _) function. |
public | __construct | Constructor activating the default information of the language. |
public | get | Get a metadata language property. |
public | getDebug | Get the Debug property. |
public | getDefault | Get the default language code. |
public | getErrorFiles | Get a list of language files that are in error state. |
public | getFirstDay | Get the first day of the week for this language. |
public | getIgnoredSearchWords | getIgnoredSearchWords function |
public | getIgnoredSearchWordsCallback | Getter for ignoredSearchWordsCallback function. |
public | getLocale | Get the language locale based on current language. |
public | getLowerLimitSearchWord | getLowerLimitSearchWord function |
public | getLowerLimitSearchWordCallback | Getter for lowerLimitSearchWordCallback function. |
public | getName | Getter for Name. |
public | getOrphans | Get the list of orphaned strings if being tracked. |
public | getPaths | Get a list of language files that have been loaded. |
public | getPluralSufficesCallback | Getter for pluralSuffixesCallback function. |
public | getPluralSuffixes | pluralSuffixes function |
public | getPluralSuffixesCallback | Getter for pluralSuffixesCallback function. |
public | getSearchDisplayedCharactersNumber | getSearchDisplayedCharactersNumber function |
public | getSearchDisplayedCharactersNumberCallback | Getter for searchDisplayedCharactersNumberCallback function. |
public | getTag | Getter for the language tag (as defined in RFC 3066). |
public | getTransliterator | Getter for transliteration function. |
public | getUpperLimitSearchWord | getUpperLimitSearchWord function |
public | getUpperLimitSearchWordCallback | Getter for upperLimitSearchWordCallback function. |
public | getUsed | Get the list of used strings. |
public | hasKey | Determines is a key exists. |
public | isRTL | Get the RTL property. |
public | load | Loads a single language file and appends the results to the existing strings. |
public | setDebug | Set the Debug property. |
public | setDefault | Set the default language code. |
public | setIgnoredSearchWordsCallback | Setter for the ignoredSearchWordsCallback function. |
public | setLanguage | Set the language attributes to the given language. |
public | setLowerLimitSearchWordCallback | Setter for the lowerLimitSearchWordCallback function. |
public | setPluralSuffixesCallback | Set the pluralSuffixes function. |
public | setSearchDisplayedCharactersNumberCallback | Setter for the searchDisplayedCharactersNumberCallback function. |
public | setTransliterator | Set the transliteration function. |
public | setUpperLimitSearchWordCallback | Setter for the upperLimitSearchWordCallback function. |
public | transliterate | Transliterate function. |
public static | _parseLanguageFiles | Searches for language directories within a certain base dir. |
public static | _parseXMLLanguageFile | Parse XML file for language information. |
public static | _parseXMLLanguageFiles | Parses XML files for language information. |
public static | exists | Check if a language exists. |
public static | getInstance | Returns a language object. |
public static | getKnownLanguages | Returns a list of known languages for an area. |
public static | getLanguagePath | Get the path to a language. |
public static | getMetadata | Returns a associative array holding the metadata. |
public static | parseLanguageFiles | Searches for language directories within a certain base dir. |
public static | parseXMLLanguageFile | Parse XML file for language information. |
public static | parseXMLLanguageFiles | Parses XML files for language information. |
protected | getCallerInfo | Determine who called or . |
protected | loadLanguage | Loads a language file. |
protected | parse | Parses a language file. |
- Defined in libraries/joomla/language/language.php
- Extends JObject
Importing[edit]
jimport( 'joomla.language.language' );
See also[edit]
- JLanguage source code on BitBucket
- Subpackage Language
- Other versions of JLanguage
Template:SeeAlso:JLanguage [Edit See Also]
User contributed notes[edit]
<CodeExamplesForm />