Difference between revisions of "JLanguage"
From Joomla! Documentation
(Bulk upload by Doxiki2) |
m (moving preparation) |
||
(5 intermediate revisions by 2 users not shown) | |||
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 | ||
|- | |- | ||
− | |[[JLanguage::_ | + | |public |
+ | |[[API17:JLanguage::_|_]] | ||
|Translate function, mimics the php gettext (alias _) function. | |Translate function, mimics the php gettext (alias _) function. | ||
|- | |- | ||
− | |[[JLanguage::__construct | + | |public |
+ | |[[API17:JLanguage::__construct|__construct]] | ||
|Constructor activating the default information of the language. | |Constructor activating the default information of the language. | ||
|- | |- | ||
− | |[[JLanguage::get | + | |public |
− | |Get a | + | |[[API17:JLanguage::get|get]] |
+ | |Get a metadata language property. | ||
|- | |- | ||
− | |[[JLanguage::getDebug | + | |public |
+ | |[[API17:JLanguage::getDebug|getDebug]] | ||
|Get the Debug property. | |Get the Debug property. | ||
|- | |- | ||
− | |[[JLanguage::getDefault | + | |public |
+ | |[[API17:JLanguage::getDefault|getDefault]] | ||
|Get the default language code. | |Get the default language code. | ||
|- | |- | ||
− | |[[JLanguage::getErrorFiles | + | |public |
+ | |[[API17:JLanguage::getErrorFiles|getErrorFiles]] | ||
|Get a list of language files that are in error state. | |Get a list of language files that are in error state. | ||
|- | |- | ||
− | |[[JLanguage::getFirstDay | + | |public |
+ | |[[API17:JLanguage::getFirstDay|getFirstDay]] | ||
|Get the first day of the week for this language. | |Get the first day of the week for this language. | ||
|- | |- | ||
− | |[[JLanguage::getIgnoredSearchWords | + | |public |
+ | |[[API17:JLanguage::getIgnoredSearchWords|getIgnoredSearchWords]] | ||
|getIgnoredSearchWords function | |getIgnoredSearchWords function | ||
|- | |- | ||
− | |[[JLanguage::getIgnoredSearchWordsCallback | + | |public |
+ | |[[API17:JLanguage::getIgnoredSearchWordsCallback|getIgnoredSearchWordsCallback]] | ||
|Getter for ignoredSearchWordsCallback function. | |Getter for ignoredSearchWordsCallback function. | ||
|- | |- | ||
− | |[[JLanguage::getLocale | + | |public |
+ | |[[API17:JLanguage::getLocale|getLocale]] | ||
|Get the language locale based on current language. | |Get the language locale based on current language. | ||
|- | |- | ||
− | |[[JLanguage::getLowerLimitSearchWord | + | |public |
+ | |[[API17:JLanguage::getLowerLimitSearchWord|getLowerLimitSearchWord]] | ||
|getLowerLimitSearchWord function | |getLowerLimitSearchWord function | ||
|- | |- | ||
− | |[[JLanguage::getLowerLimitSearchWordCallback | + | |public |
+ | |[[API17:JLanguage::getLowerLimitSearchWordCallback|getLowerLimitSearchWordCallback]] | ||
|Getter for lowerLimitSearchWordCallback function. | |Getter for lowerLimitSearchWordCallback function. | ||
|- | |- | ||
− | |[[JLanguage::getName | + | |public |
+ | |[[API17:JLanguage::getName|getName]] | ||
|Getter for Name. | |Getter for Name. | ||
|- | |- | ||
− | |[[JLanguage::getOrphans | + | |public |
+ | |[[API17:JLanguage::getOrphans|getOrphans]] | ||
|Get the list of orphaned strings if being tracked. | |Get the list of orphaned strings if being tracked. | ||
|- | |- | ||
− | |[[JLanguage::getPaths | + | |public |
+ | |[[API17:JLanguage::getPaths|getPaths]] | ||
|Get a list of language files that have been loaded. | |Get a list of language files that have been loaded. | ||
|- | |- | ||
− | |[[JLanguage::getPluralSuffixes | + | |public |
+ | |[[API17:JLanguage::getPluralSufficesCallback|getPluralSufficesCallback]] | ||
+ | |Getter for pluralSuffixesCallback function. | ||
+ | |- | ||
+ | |public | ||
+ | |[[API17:JLanguage::getPluralSuffixes|getPluralSuffixes]] | ||
|pluralSuffixes function | |pluralSuffixes function | ||
|- | |- | ||
− | |[[JLanguage::getPluralSuffixesCallback | + | |public |
− | |Getter for | + | |[[API17:JLanguage::getPluralSuffixesCallback|getPluralSuffixesCallback]] |
+ | |Getter for pluralSuffixesCallback function. | ||
|- | |- | ||
− | |[[JLanguage::getSearchDisplayedCharactersNumber | + | |public |
+ | |[[API17:JLanguage::getSearchDisplayedCharactersNumber|getSearchDisplayedCharactersNumber]] | ||
|getSearchDisplayedCharactersNumber function | |getSearchDisplayedCharactersNumber function | ||
|- | |- | ||
− | |[[JLanguage::getSearchDisplayedCharactersNumberCallback | + | |public |
+ | |[[API17:JLanguage::getSearchDisplayedCharactersNumberCallback|getSearchDisplayedCharactersNumberCallback]] | ||
|Getter for searchDisplayedCharactersNumberCallback function. | |Getter for searchDisplayedCharactersNumberCallback function. | ||
|- | |- | ||
− | |[[JLanguage::getTag | + | |public |
− | | | + | |[[API17:JLanguage::getTag|getTag]] |
+ | |Getter for the language tag (as defined in RFC 3066). | ||
|- | |- | ||
− | |[[JLanguage::getTransliterator | + | |public |
+ | |[[API17:JLanguage::getTransliterator|getTransliterator]] | ||
|Getter for transliteration function. | |Getter for transliteration function. | ||
|- | |- | ||
− | |[[JLanguage::getUpperLimitSearchWord | + | |public |
+ | |[[API17:JLanguage::getUpperLimitSearchWord|getUpperLimitSearchWord]] | ||
|getUpperLimitSearchWord function | |getUpperLimitSearchWord function | ||
|- | |- | ||
− | |[[JLanguage::getUpperLimitSearchWordCallback | + | |public |
+ | |[[API17:JLanguage::getUpperLimitSearchWordCallback|getUpperLimitSearchWordCallback]] | ||
|Getter for upperLimitSearchWordCallback function. | |Getter for upperLimitSearchWordCallback function. | ||
|- | |- | ||
− | |[[JLanguage::getUsed | + | |public |
+ | |[[API17:JLanguage::getUsed|getUsed]] | ||
|Get the list of used strings. | |Get the list of used strings. | ||
|- | |- | ||
− | |[[JLanguage::hasKey | + | |public |
+ | |[[API17:JLanguage::hasKey|hasKey]] | ||
|Determines is a key exists. | |Determines is a key exists. | ||
|- | |- | ||
− | |[[JLanguage::isRTL | + | |public |
+ | |[[API17:JLanguage::isRTL|isRTL]] | ||
|Get the RTL property. | |Get the RTL property. | ||
|- | |- | ||
− | |[[JLanguage::load | + | |public |
+ | |[[API17:JLanguage::load|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. | ||
|- | |- | ||
− | |[[JLanguage::setDebug | + | |public |
+ | |[[API17:JLanguage::setDebug|setDebug]] | ||
|Set the Debug property. | |Set the Debug property. | ||
|- | |- | ||
− | |[[JLanguage::setDefault | + | |public |
+ | |[[API17:JLanguage::setDefault|setDefault]] | ||
|Set the default language code. | |Set the default language code. | ||
|- | |- | ||
− | |[[JLanguage::setIgnoredSearchWordsCallback | + | |public |
+ | |[[API17:JLanguage::setIgnoredSearchWordsCallback|setIgnoredSearchWordsCallback]] | ||
|Setter for the ignoredSearchWordsCallback function. | |Setter for the ignoredSearchWordsCallback function. | ||
|- | |- | ||
− | |[[JLanguage::setLanguage | + | |public |
+ | |[[API17:JLanguage::setLanguage|setLanguage]] | ||
|Set the language attributes to the given language. | |Set the language attributes to the given language. | ||
|- | |- | ||
− | |[[JLanguage::setLowerLimitSearchWordCallback | + | |public |
+ | |[[API17:JLanguage::setLowerLimitSearchWordCallback|setLowerLimitSearchWordCallback]] | ||
|Setter for the lowerLimitSearchWordCallback function. | |Setter for the lowerLimitSearchWordCallback function. | ||
|- | |- | ||
− | |[[JLanguage:: | + | |public |
− | |Set the | + | |[[API17:JLanguage::setPluralSuffixesCallback|setPluralSuffixesCallback]] |
+ | |Set the pluralSuffixes function. | ||
|- | |- | ||
− | |[[JLanguage::setSearchDisplayedCharactersNumberCallback | + | |public |
+ | |[[API17:JLanguage::setSearchDisplayedCharactersNumberCallback|setSearchDisplayedCharactersNumberCallback]] | ||
|Setter for the searchDisplayedCharactersNumberCallback function. | |Setter for the searchDisplayedCharactersNumberCallback function. | ||
|- | |- | ||
− | |[[JLanguage::setTransliterator | + | |public |
+ | |[[API17:JLanguage::setTransliterator|setTransliterator]] | ||
|Set the transliteration function. | |Set the transliteration function. | ||
|- | |- | ||
− | |[[JLanguage::setUpperLimitSearchWordCallback | + | |public |
+ | |[[API17:JLanguage::setUpperLimitSearchWordCallback|setUpperLimitSearchWordCallback]] | ||
|Setter for the upperLimitSearchWordCallback function. | |Setter for the upperLimitSearchWordCallback function. | ||
|- | |- | ||
− | |[[JLanguage::transliterate | + | |public |
+ | |[[API17:JLanguage::transliterate|transliterate]] | ||
|Transliterate function. | |Transliterate function. | ||
|- | |- | ||
− | |[[JLanguage::_parseLanguageFiles | + | |public static |
+ | |[[API17:JLanguage::_parseLanguageFiles|_parseLanguageFiles]] | ||
|Searches for language directories within a certain base dir. | |Searches for language directories within a certain base dir. | ||
|- | |- | ||
− | |[[JLanguage::_parseXMLLanguageFile | + | |public static |
+ | |[[API17:JLanguage::_parseXMLLanguageFile|_parseXMLLanguageFile]] | ||
|Parse XML file for language information. | |Parse XML file for language information. | ||
|- | |- | ||
− | |[[JLanguage::_parseXMLLanguageFiles | + | |public static |
+ | |[[API17:JLanguage::_parseXMLLanguageFiles|_parseXMLLanguageFiles]] | ||
|Parses XML files for language information. | |Parses XML files for language information. | ||
|- | |- | ||
− | |[[JLanguage::exists | + | |public static |
+ | |[[API17:JLanguage::exists|exists]] | ||
|Check if a language exists. | |Check if a language exists. | ||
|- | |- | ||
− | |[[JLanguage::getInstance | + | |public static |
+ | |[[API17:JLanguage::getInstance|getInstance]] | ||
|Returns a language object. | |Returns a language object. | ||
|- | |- | ||
− | |[[JLanguage::getKnownLanguages | + | |public static |
+ | |[[API17:JLanguage::getKnownLanguages|getKnownLanguages]] | ||
|Returns a list of known languages for an area. | |Returns a list of known languages for an area. | ||
|- | |- | ||
− | |[[JLanguage::getLanguagePath | + | |public static |
+ | |[[API17:JLanguage::getLanguagePath|getLanguagePath]] | ||
|Get the path to a language. | |Get the path to a language. | ||
|- | |- | ||
− | |[[JLanguage::getMetadata | + | |public static |
+ | |[[API17:JLanguage::getMetadata|getMetadata]] | ||
|Returns a associative array holding the metadata. | |Returns a associative array holding the metadata. | ||
|- | |- | ||
− | |[[JLanguage::parseLanguageFiles | + | |public static |
+ | |[[API17:JLanguage::parseLanguageFiles|parseLanguageFiles]] | ||
|Searches for language directories within a certain base dir. | |Searches for language directories within a certain base dir. | ||
|- | |- | ||
− | |[[JLanguage::parseXMLLanguageFile | + | |public static |
+ | |[[API17:JLanguage::parseXMLLanguageFile|parseXMLLanguageFile]] | ||
|Parse XML file for language information. | |Parse XML file for language information. | ||
|- | |- | ||
− | |[[JLanguage::parseXMLLanguageFiles | + | |public static |
+ | |[[API17:JLanguage::parseXMLLanguageFiles|parseXMLLanguageFiles]] | ||
|Parses XML files for language information. | |Parses XML files for language information. | ||
|- | |- | ||
− | |[[JLanguage::getCallerInfo | + | |protected |
+ | |[[API17:JLanguage::getCallerInfo|getCallerInfo]] | ||
|Determine who called or . | |Determine who called or . | ||
|- | |- | ||
− | |[[JLanguage::loadLanguage | + | |protected |
+ | |[[API17:JLanguage::loadLanguage|loadLanguage]] | ||
|Loads a language file. | |Loads a language file. | ||
|- | |- | ||
− | |[[JLanguage::parse | + | |protected |
+ | |[[API17:JLanguage::parse|parse]] | ||
|Parses a language file. | |Parses a language file. | ||
|- | |- | ||
|} | |} | ||
+ | * '''Defined in''' libraries/joomla/language/language.php | ||
+ | * '''Extends''' [[API17:JObject|JObject]] | ||
===Importing=== | ===Importing=== | ||
<source lang="php">jimport( 'joomla.language.language' );</source> | <source lang="php">jimport( 'joomla.language.language' );</source> | ||
===See also=== | ===See also=== | ||
− | * [[JLanguage|Other versions of | + | * {{JVer|11.1}} '''JLanguage source code''' on [[jplatform:language/language.php|BitBucket]] |
+ | * {{JVer|11.1}} Subpackage [[API17:Subpackage Language|Language]] | ||
+ | * [[API17: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 187: | Line 242: | ||
category=ClassExample | category=ClassExample | ||
include=* | include=* | ||
+ | namespace=CodeExample | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
− | <noinclude> | + | <noinclude>[[Category:Platform 11.1]][[Category:Archived pages API17]]</noinclude> |
Revision as of 21:05, 11 May 2013
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 />