Difference between revisions of "JLanguage"
From Joomla! Documentation
m (→User contributed notes: bad link repair) |
m (preparing for archive only) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
=={{JVer|11.1}} JLanguage== | =={{JVer|11.1}} JLanguage== | ||
===Description=== | ===Description=== | ||
− | + | ||
− | + | ||
− | |||
− | |||
===Methods=== | ===Methods=== | ||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
Line 14: | Line 12: | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::_ | + | |[[API17:JLanguage::_|_]] |
|Translate function, mimics the php gettext (alias _) function. | |Translate function, mimics the php gettext (alias _) function. | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::__construct | + | |[[API17:JLanguage::__construct|__construct]] |
|Constructor activating the default information of the language. | |Constructor activating the default information of the language. | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::get | + | |[[API17:JLanguage::get|get]] |
|Get a metadata language property. | |Get a metadata language property. | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::getDebug | + | |[[API17:JLanguage::getDebug|getDebug]] |
|Get the Debug property. | |Get the Debug property. | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::getDefault | + | |[[API17:JLanguage::getDefault|getDefault]] |
|Get the default language code. | |Get the default language code. | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::getErrorFiles | + | |[[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. | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::getFirstDay | + | |[[API17:JLanguage::getFirstDay|getFirstDay]] |
|Get the first day of the week for this language. | |Get the first day of the week for this language. | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::getIgnoredSearchWords | + | |[[API17:JLanguage::getIgnoredSearchWords|getIgnoredSearchWords]] |
|getIgnoredSearchWords function | |getIgnoredSearchWords function | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::getIgnoredSearchWordsCallback | + | |[[API17:JLanguage::getIgnoredSearchWordsCallback|getIgnoredSearchWordsCallback]] |
|Getter for ignoredSearchWordsCallback function. | |Getter for ignoredSearchWordsCallback function. | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::getLocale | + | |[[API17:JLanguage::getLocale|getLocale]] |
|Get the language locale based on current language. | |Get the language locale based on current language. | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::getLowerLimitSearchWord | + | |[[API17:JLanguage::getLowerLimitSearchWord|getLowerLimitSearchWord]] |
|getLowerLimitSearchWord function | |getLowerLimitSearchWord function | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::getLowerLimitSearchWordCallback | + | |[[API17:JLanguage::getLowerLimitSearchWordCallback|getLowerLimitSearchWordCallback]] |
|Getter for lowerLimitSearchWordCallback function. | |Getter for lowerLimitSearchWordCallback function. | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::getName | + | |[[API17:JLanguage::getName|getName]] |
|Getter for Name. | |Getter for Name. | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::getOrphans | + | |[[API17:JLanguage::getOrphans|getOrphans]] |
|Get the list of orphaned strings if being tracked. | |Get the list of orphaned strings if being tracked. | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::getPaths | + | |[[API17:JLanguage::getPaths|getPaths]] |
|Get a list of language files that have been loaded. | |Get a list of language files that have been loaded. | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::getPluralSufficesCallback | + | |[[API17:JLanguage::getPluralSufficesCallback|getPluralSufficesCallback]] |
|Getter for pluralSuffixesCallback function. | |Getter for pluralSuffixesCallback function. | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::getPluralSuffixes | + | |[[API17:JLanguage::getPluralSuffixes|getPluralSuffixes]] |
|pluralSuffixes function | |pluralSuffixes function | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::getPluralSuffixesCallback | + | |[[API17:JLanguage::getPluralSuffixesCallback|getPluralSuffixesCallback]] |
|Getter for pluralSuffixesCallback function. | |Getter for pluralSuffixesCallback function. | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::getSearchDisplayedCharactersNumber | + | |[[API17:JLanguage::getSearchDisplayedCharactersNumber|getSearchDisplayedCharactersNumber]] |
|getSearchDisplayedCharactersNumber function | |getSearchDisplayedCharactersNumber function | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::getSearchDisplayedCharactersNumberCallback | + | |[[API17:JLanguage::getSearchDisplayedCharactersNumberCallback|getSearchDisplayedCharactersNumberCallback]] |
|Getter for searchDisplayedCharactersNumberCallback function. | |Getter for searchDisplayedCharactersNumberCallback function. | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::getTag | + | |[[API17:JLanguage::getTag|getTag]] |
|Getter for the language tag (as defined in RFC 3066). | |Getter for the language tag (as defined in RFC 3066). | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::getTransliterator | + | |[[API17:JLanguage::getTransliterator|getTransliterator]] |
|Getter for transliteration function. | |Getter for transliteration function. | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::getUpperLimitSearchWord | + | |[[API17:JLanguage::getUpperLimitSearchWord|getUpperLimitSearchWord]] |
|getUpperLimitSearchWord function | |getUpperLimitSearchWord function | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::getUpperLimitSearchWordCallback | + | |[[API17:JLanguage::getUpperLimitSearchWordCallback|getUpperLimitSearchWordCallback]] |
|Getter for upperLimitSearchWordCallback function. | |Getter for upperLimitSearchWordCallback function. | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::getUsed | + | |[[API17:JLanguage::getUsed|getUsed]] |
|Get the list of used strings. | |Get the list of used strings. | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::hasKey | + | |[[API17:JLanguage::hasKey|hasKey]] |
|Determines is a key exists. | |Determines is a key exists. | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::isRTL | + | |[[API17:JLanguage::isRTL|isRTL]] |
|Get the RTL property. | |Get the RTL property. | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::load | + | |[[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. | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::setDebug | + | |[[API17:JLanguage::setDebug|setDebug]] |
|Set the Debug property. | |Set the Debug property. | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::setDefault | + | |[[API17:JLanguage::setDefault|setDefault]] |
|Set the default language code. | |Set the default language code. | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::setIgnoredSearchWordsCallback | + | |[[API17:JLanguage::setIgnoredSearchWordsCallback|setIgnoredSearchWordsCallback]] |
|Setter for the ignoredSearchWordsCallback function. | |Setter for the ignoredSearchWordsCallback function. | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::setLanguage | + | |[[API17:JLanguage::setLanguage|setLanguage]] |
|Set the language attributes to the given language. | |Set the language attributes to the given language. | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::setLowerLimitSearchWordCallback | + | |[[API17:JLanguage::setLowerLimitSearchWordCallback|setLowerLimitSearchWordCallback]] |
|Setter for the lowerLimitSearchWordCallback function. | |Setter for the lowerLimitSearchWordCallback function. | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::setPluralSuffixesCallback | + | |[[API17:JLanguage::setPluralSuffixesCallback|setPluralSuffixesCallback]] |
|Set the pluralSuffixes function. | |Set the pluralSuffixes function. | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::setSearchDisplayedCharactersNumberCallback | + | |[[API17:JLanguage::setSearchDisplayedCharactersNumberCallback|setSearchDisplayedCharactersNumberCallback]] |
|Setter for the searchDisplayedCharactersNumberCallback function. | |Setter for the searchDisplayedCharactersNumberCallback function. | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::setTransliterator | + | |[[API17:JLanguage::setTransliterator|setTransliterator]] |
|Set the transliteration function. | |Set the transliteration function. | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::setUpperLimitSearchWordCallback | + | |[[API17:JLanguage::setUpperLimitSearchWordCallback|setUpperLimitSearchWordCallback]] |
|Setter for the upperLimitSearchWordCallback function. | |Setter for the upperLimitSearchWordCallback function. | ||
|- | |- | ||
|public | |public | ||
− | |[[JLanguage::transliterate | + | |[[API17:JLanguage::transliterate|transliterate]] |
|Transliterate function. | |Transliterate function. | ||
|- | |- | ||
|public static | |public static | ||
− | |[[JLanguage::_parseLanguageFiles | + | |[[API17:JLanguage::_parseLanguageFiles|_parseLanguageFiles]] |
|Searches for language directories within a certain base dir. | |Searches for language directories within a certain base dir. | ||
|- | |- | ||
|public static | |public static | ||
− | |[[JLanguage::_parseXMLLanguageFile | + | |[[API17:JLanguage::_parseXMLLanguageFile|_parseXMLLanguageFile]] |
|Parse XML file for language information. | |Parse XML file for language information. | ||
|- | |- | ||
|public static | |public static | ||
− | |[[JLanguage::_parseXMLLanguageFiles | + | |[[API17:JLanguage::_parseXMLLanguageFiles|_parseXMLLanguageFiles]] |
|Parses XML files for language information. | |Parses XML files for language information. | ||
|- | |- | ||
|public static | |public static | ||
− | |[[JLanguage::exists | + | |[[API17:JLanguage::exists|exists]] |
|Check if a language exists. | |Check if a language exists. | ||
|- | |- | ||
|public static | |public static | ||
− | |[[JLanguage::getInstance | + | |[[API17:JLanguage::getInstance|getInstance]] |
|Returns a language object. | |Returns a language object. | ||
|- | |- | ||
|public static | |public static | ||
− | |[[JLanguage::getKnownLanguages | + | |[[API17:JLanguage::getKnownLanguages|getKnownLanguages]] |
|Returns a list of known languages for an area. | |Returns a list of known languages for an area. | ||
|- | |- | ||
|public static | |public static | ||
− | |[[JLanguage::getLanguagePath | + | |[[API17:JLanguage::getLanguagePath|getLanguagePath]] |
|Get the path to a language. | |Get the path to a language. | ||
|- | |- | ||
|public static | |public static | ||
− | |[[JLanguage::getMetadata | + | |[[API17:JLanguage::getMetadata|getMetadata]] |
|Returns a associative array holding the metadata. | |Returns a associative array holding the metadata. | ||
|- | |- | ||
|public static | |public static | ||
− | |[[JLanguage::parseLanguageFiles | + | |[[API17:JLanguage::parseLanguageFiles|parseLanguageFiles]] |
|Searches for language directories within a certain base dir. | |Searches for language directories within a certain base dir. | ||
|- | |- | ||
|public static | |public static | ||
− | |[[JLanguage::parseXMLLanguageFile | + | |[[API17:JLanguage::parseXMLLanguageFile|parseXMLLanguageFile]] |
|Parse XML file for language information. | |Parse XML file for language information. | ||
|- | |- | ||
|public static | |public static | ||
− | |[[JLanguage::parseXMLLanguageFiles | + | |[[API17:JLanguage::parseXMLLanguageFiles|parseXMLLanguageFiles]] |
|Parses XML files for language information. | |Parses XML files for language information. | ||
|- | |- | ||
|protected | |protected | ||
− | |[[JLanguage::getCallerInfo | + | |[[API17:JLanguage::getCallerInfo|getCallerInfo]] |
|Determine who called or . | |Determine who called or . | ||
|- | |- | ||
|protected | |protected | ||
− | |[[JLanguage::loadLanguage | + | |[[API17:JLanguage::loadLanguage|loadLanguage]] |
|Loads a language file. | |Loads a language file. | ||
|- | |- | ||
|protected | |protected | ||
− | |[[JLanguage::parse | + | |[[API17:JLanguage::parse|parse]] |
|Parses a language file. | |Parses a language file. | ||
|- | |- | ||
|} | |} | ||
* '''Defined in''' libraries/joomla/language/language.php | * '''Defined in''' libraries/joomla/language/language.php | ||
− | * '''Extends''' [[JObject | + | * '''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=== | ||
* {{JVer|11.1}} '''JLanguage source code''' on [[jplatform:language/language.php|BitBucket]] | * {{JVer|11.1}} '''JLanguage source code''' on [[jplatform:language/language.php|BitBucket]] | ||
− | * {{JVer|11.1}} Subpackage [[Subpackage Language | + | * {{JVer|11.1}} Subpackage [[API17:Subpackage Language|Language]] |
− | * [[JLanguage|Other versions of JLanguage]] | + | * [[API17:JLanguage|Other versions of JLanguage]] |
− | + | ||
− | + | ||
− | |||
− | |||
===User contributed notes=== | ===User contributed notes=== | ||
− | + | === Code Examples === | |
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=JLanguage | category=JLanguage | ||
− | + | namespace=CodeExample | |
category=ClassExample | category=ClassExample | ||
include=* | include=* | ||
Line 245: | Line 241: | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
− | <noinclude> | + | <noinclude>[[Category:Platform 11.1]][[Category:Archived pages API17]]</noinclude> |
Latest revision as of 22:21, 24 March 2017
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]
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
User contributed notes[edit]
Code Examples[edit]