Joomla CMS  2.5.24 (avec JPlatform 11.4 inclus)
Documentation des API du CMS Joomla en version 2.5 et du framework Joomla Platform intégré
 Tout Classes Espaces de nommage Fichiers Fonctions Variables Pages
Référence de la classe JLanguage
+ Graphe d'héritage de JLanguage:
+ Graphe de collaboration de JLanguage:

Liste de tous les membres

Fonctions membres publiques

 __construct ($lang=null, $debug=false)
 _ ($string, $jsSafe=false, $interpretBackSlashes=true)
 transliterate ($string)
 getTransliterator ()
 setTransliterator ($function)
 getPluralSuffixes ($count)
 getPluralSufficesCallback ()
 getPluralSuffixesCallback ()
 setPluralSuffixesCallback ($function)
 getIgnoredSearchWords ()
 getIgnoredSearchWordsCallback ()
 setIgnoredSearchWordsCallback ($function)
 getLowerLimitSearchWord ()
 getLowerLimitSearchWordCallback ()
 setLowerLimitSearchWordCallback ($function)
 getUpperLimitSearchWord ()
 getUpperLimitSearchWordCallback ()
 setUpperLimitSearchWordCallback ($function)
 getSearchDisplayedCharactersNumber ()
 getSearchDisplayedCharactersNumberCallback ()
 setSearchDisplayedCharactersNumberCallback ($function)
 load ($extension= 'joomla', $basePath=JPATH_BASE, $lang=null, $reload=false, $default=true)
 get ($property, $default=null)
 getName ()
 getPaths ($extension=null)
 getErrorFiles ()
 getTag ()
 isRTL ()
 setDebug ($debug)
 getDebug ()
 getDefault ()
 setDefault ($lang)
 getOrphans ()
 getUsed ()
 hasKey ($string)
 setLanguage ($lang)
 getLocale ()
 getFirstDay ()
- Fonctions membres publiques inherited from JObject
 __construct ($properties=null)
 __toString ()
 def ($property, $default=null)
 getProperties ($public=true)
 getError ($i=null, $toString=true)
 getErrors ()
 set ($property, $value=null)
 setProperties ($properties)
 setError ($error)
 toString ()

Fonctions membres publiques statiques

static getInstance ($lang, $debug=false)
static exists ($lang, $basePath=JPATH_BASE)
static getMetadata ($lang)
static getKnownLanguages ($basePath=JPATH_BASE)
static getLanguagePath ($basePath=JPATH_BASE, $language=null)
static _parseLanguageFiles ($dir=null)
static parseLanguageFiles ($dir=null)
static _parseXMLLanguageFiles ($dir=null)
static parseXMLLanguageFiles ($dir=null)
static _parseXMLLanguageFile ($path)
static parseXMLLanguageFile ($path)

Fonctions membres protégées

 loadLanguage ($filename, $extension= 'unknown', $overwrite=true)
 parse ($filename)
 getCallerInfo ()

Attributs protégés

 $debug = false
 $default = 'en-GB'
 $orphans = array()
 $metadata = null
 $locale = null
 $lang = null
 $paths = array()
 $errorfiles = array()
 $strings = null
 $used = array()
 $counter = 0
 $override = array()
 $transliterator = null
 $pluralSuffixesCallback = null
 $ignoredSearchWordsCallback = null
 $lowerLimitSearchWordCallback = null
 $upperLimitSearchWordCallback = null
 $searchDisplayedCharactersNumberCallback = null
- Attributs protégés inherited from JObject
 $_errors = array()

Attributs protégés statiques

static $languages = array()

Documentation des constructeurs et destructeur

JLanguage::__construct (   $lang = null,
  $debug = false 
)

Constructor activating the default information of the language.

Paramètres:
string$langThe language
boolean$debugIndicates if language debugging is enabled.
Depuis:
11.1

Références $class, $lang, $path, JPATH_ADMINISTRATOR, JPATH_BASE, JPATH_SITE, et null.


Documentation des fonctions membres

JLanguage::_ (   $string,
  $jsSafe = false,
  $interpretBackSlashes = true 
)

Translate function, mimics the php gettext (alias _) function.

The function checks if $jsSafe is true, then if $interpretBackslashes is true.

Paramètres:
string$stringThe string to translate
boolean$jsSafeMake the result javascript safe
boolean$interpretBackSlashesInterpret and
Renvoie:
string The translation of the string
Depuis:
11.1

Références $key, et elseif.

static JLanguage::_parseLanguageFiles (   $dir = null)
static

Searches for language directories within a certain base dir.

Paramètres:
string$dirDirectory of files.
Renvoie:
array Array holding the found languages as filename => real name pairs.
Obsolète:
12.1
Note:
Use parseLanguageFiles instead.
Depuis:
11.1

Références JLog\add(), et JLog\WARNING.

+ Voici le graphe d'appel pour cette fonction :

static JLanguage::_parseXMLLanguageFile (   $path)
static

Parse XML file for language information.

Paramètres:
string$pathPath to the XML files.
Renvoie:
array Array holding the found metadata as a key => value pair.
Obsolète:
12.1
Note:
Use parseXMLLanguageFile instead.
Depuis:
11.1

Références $path.

static JLanguage::_parseXMLLanguageFiles (   $dir = null)
static

Parses XML files for language information.

Paramètres:
string$dirDirectory of files.
Renvoie:
array Array holding the found languages as filename => metadata array.
Note:
Use parseXMLLanguageFiles instead.
Depuis:
11.1
Obsolète:
12.1

Références JLog\add(), et JLog\WARNING.

+ Voici le graphe d'appel pour cette fonction :

static JLanguage::exists (   $lang,
  $basePath = JPATH_BASE 
)
static

Checks if a language exists.

This is a simple, quick check for the directory that should contain language files for the given user.

Paramètres:
string$langLanguage to check.
string$basePathOptional path to check.
Renvoie:
boolean True if the language exists.
Depuis:
11.1

Références $lang, $path, JFolder\exists(), et jimport().

Référencé par modLanguagesHelper\getList(), JAdministrator\initialise(), JSite\initialise(), plgSystemLanguageFilter\onAfterDispatch(), et plgSystemLanguageFilter\parseRule().

+ Voici le graphe d'appel pour cette fonction :

+ Voici le graphe des appelants de cette fonction :

JLanguage::get (   $property,
  $default = null 
)

Get a metadata language property.

Paramètres:
string$propertyThe name of the property.
mixed$defaultThe default value.
Renvoie:
mixed The value of the property.
Depuis:
11.1

Réimplémentée à partir de JObject.

JLanguage::getCallerInfo ( )
protected

Determine who called JLanguage or JText.

Renvoie:
array Caller information.
Depuis:
11.1

Références $class, et null.

JLanguage::getDebug ( )

Get the Debug property.

Renvoie:
boolean True is in debug mode.
Depuis:
11.1
JLanguage::getDefault ( )

Get the default language code.

Renvoie:
string Language code.
Depuis:
11.1
JLanguage::getErrorFiles ( )

Get a list of language files that are in error state.

Renvoie:
array
Depuis:
11.1
JLanguage::getFirstDay ( )

Get the first day of the week for this language.

Renvoie:
integer The first day of the week according to the language
Depuis:
11.1
JLanguage::getIgnoredSearchWords ( )

Returns an array of ignored search words

Renvoie:
array The array of ignored search words.
Depuis:
11.1

Références null.

JLanguage::getIgnoredSearchWordsCallback ( )

Getter for ignoredSearchWordsCallback function.

Renvoie:
mixed Function name (string) or the actual function for PHP 5.3 (function).
Depuis:
11.1
static JLanguage::getInstance (   $lang,
  $debug = false 
)
static

Returns a language object.

Paramètres:
string$langThe language to use.
boolean$debugThe debug mode.
Renvoie:
JLanguage The Language object.
Depuis:
11.1

Références $lang.

Référencé par JFactory\createLanguage(), LanguagesModelOverride\getForm(), plgContentJoomla\onContentAfterSave(), et MessagesModelMessage\save().

+ Voici le graphe des appelants de cette fonction :

static JLanguage::getKnownLanguages (   $basePath = JPATH_BASE)
static

Returns a list of known languages for an area

Paramètres:
string$basePathThe basepath to use
Renvoie:
array key/value pair with the language file and real name.
Depuis:
11.1

Référencé par JLanguageHelper\createLanguageList(), JLanguageHelper\getLanguages(), LanguagesModelOverrides\getLanguages(), et plgSystemLanguagecode\onContentPrepareForm().

+ Voici le graphe des appelants de cette fonction :

static JLanguage::getLanguagePath (   $basePath = JPATH_BASE,
  $language = null 
)
static

Get the path to a language

Paramètres:
string$basePathThe basepath to use.
string$languageThe language tag.
Renvoie:
string language related path or null.
Depuis:
11.1

Références $language.

Référencé par JHtmlUsers\admin_language(), JInstallation\getLocaliseAdmin(), LanguagesModelInstalled\getPath(), et JHtmlUsers\language().

+ Voici le graphe des appelants de cette fonction :

JLanguage::getLocale ( )

Get the language locale based on current language.

Renvoie:
array The locale according to the language.
Depuis:
11.1
JLanguage::getLowerLimitSearchWord ( )

Returns a lower limit integer for length of search words

Renvoie:
integer The lower limit integer for length of search words (3 if no value was set for a specific language).
Depuis:
11.1

Références null.

JLanguage::getLowerLimitSearchWordCallback ( )

Getter for lowerLimitSearchWordCallback function

Renvoie:
mixed Function name (string) or the actual function for PHP 5.3 (function).
Depuis:
11.1
static JLanguage::getMetadata (   $lang)
static

Returns a associative array holding the metadata.

Paramètres:
string$langThe name of the language.
Renvoie:
mixed If $lang exists return key/value pair with the language metadata, otherwise return NULL.
Depuis:
11.1

Références $file, $lang, $path, JPATH_BASE, et null.

JLanguage::getName ( )

Getter for Name.

Renvoie:
string Official name element of the language.
Depuis:
11.1
JLanguage::getOrphans ( )

Get the list of orphaned strings if being tracked.

Renvoie:
array Orphaned text.
Depuis:
11.1
JLanguage::getPaths (   $extension = null)

Get a list of language files that have been loaded.

Paramètres:
string$extensionAn optional extension name.
Renvoie:
array
Depuis:
11.1

Références $extension, et null.

JLanguage::getPluralSufficesCallback ( )

Getter for pluralSuffixesCallback function.

Renvoie:
mixed Function name (string) or the actual function for PHP 5.3 (function).
Depuis:
11.1
Obsolète:
12.1
Note:
Use JLanguage::getPluralSuffixesCallback method instead

Références JLog\add(), et JLog\WARNING.

+ Voici le graphe d'appel pour cette fonction :

JLanguage::getPluralSuffixes (   $count)

Returns an array of suffixes for plural rules.

Paramètres:
integer$countThe count number the rule is for.
Renvoie:
array The array of suffixes.
Depuis:
11.1

Références $count, et null.

JLanguage::getPluralSuffixesCallback ( )

Getter for pluralSuffixesCallback function.

Renvoie:
mixed Function name (string) or the actual function for PHP 5.3 (function).
Depuis:
11.1
JLanguage::getSearchDisplayedCharactersNumber ( )

Returns the number of characters displayed in search results.

Renvoie:
integer The number of characters displayed (200 if no value was set for a specific language).
Depuis:
11.1

Références null.

JLanguage::getSearchDisplayedCharactersNumberCallback ( )

Getter for searchDisplayedCharactersNumberCallback function

Renvoie:
mixed Function name or the actual function for PHP 5.3.
Depuis:
11.1
JLanguage::getTag ( )

Getter for the language tag (as defined in RFC 3066)

Renvoie:
string The language tag.
Depuis:
11.1
JLanguage::getTransliterator ( )

Getter for transliteration function

Renvoie:
string Function name or the actual function for PHP 5.3.
Depuis:
11.1
JLanguage::getUpperLimitSearchWord ( )

Returns an upper limit integer for length of search words

Renvoie:
integer The upper limit integer for length of search words (20 if no value was set for a specific language).
Depuis:
11.1

Références null.

JLanguage::getUpperLimitSearchWordCallback ( )

Getter for upperLimitSearchWordCallback function

Renvoie:
string|function Function name or the actual function for PHP 5.3.
Depuis:
11.1
JLanguage::getUsed ( )

Get the list of used strings.

Used strings are those strings requested and found either as a string or a constant.

Renvoie:
array Used strings.
Depuis:
11.1
JLanguage::hasKey (   $string)

Determines is a key exists.

Paramètres:
string$stringThe key to check.
Renvoie:
boolean True, if the key exists.
Depuis:
11.1

Références $key.

JLanguage::isRTL ( )

Get the RTL property.

Renvoie:
boolean True is it an RTL language.
Depuis:
11.1
JLanguage::load (   $extension = 'joomla',
  $basePath = JPATH_BASE,
  $lang = null,
  $reload = false,
  $default = true 
)

Loads a single language file and appends the results to the existing strings

Paramètres:
string$extensionThe extension for which a language file should be loaded.
string$basePathThe basepath to use.
string$langThe language to load, default null for the current language.
boolean$reloadFlag that will force a language to be reloaded if set to true.
boolean$defaultFlag that force the default language to be loaded if the current does not exist.
Renvoie:
boolean True if the file has successfully loaded.
Depuis:
11.1

Références $extension, $lang, $path, et JFactory\getConfig().

+ Voici le graphe d'appel pour cette fonction :

JLanguage::loadLanguage (   $filename,
  $extension = 'unknown',
  $overwrite = true 
)
protected

Loads a language file.

This method will not note the successful loading of a file - use load() instead.

Paramètres:
string$filenameThe name of the file.
string$extensionThe name of the extension.
boolean$overwriteNot used??
Renvoie:
boolean True if new strings have been added to the language
Voir également:
JLanguage::load()
Depuis:
11.1

Références $extension.

JLanguage::parse (   $filename)
protected

Parses a language file.

Paramètres:
string$filenameThe name of the file.
Renvoie:
array The array of parsed strings.
Depuis:
11.1

Références $key, $version, elseif, null, JStream\open(), et JText\sprintf().

+ Voici le graphe d'appel pour cette fonction :

static JLanguage::parseLanguageFiles (   $dir = null)
static

Searches for language directories within a certain base dir.

Paramètres:
string$dirdirectory of files.
Renvoie:
array Array holding the found languages as filename => real name pairs.
Depuis:
11.1

Références $langs, $path, JFolder\folders(), et jimport().

+ Voici le graphe d'appel pour cette fonction :

static JLanguage::parseXMLLanguageFile (   $path)
static

Parse XML file for language information.

Paramètres:
string$pathPath to the XML files.
Renvoie:
array Array holding the found metadata as a key => value pair.
Depuis:
11.1

Références $path, JFactory\getXML(), et null.

Référencé par JHtmlUsers\admin_language(), et JHtmlUsers\language().

+ Voici le graphe d'appel pour cette fonction :

+ Voici le graphe des appelants de cette fonction :

static JLanguage::parseXMLLanguageFiles (   $dir = null)
static

Parses XML files for language information

Paramètres:
string$dirDirectory of files.
Renvoie:
array Array holding the found languages as filename => metadata array.
Depuis:
11.1

Références $file, $files, $lang, JFolder\files(), jimport(), et null.

+ Voici le graphe d'appel pour cette fonction :

JLanguage::setDebug (   $debug)

Set the Debug property.

Paramètres:
boolean$debugThe debug setting.
Renvoie:
boolean Previous value.
Depuis:
11.1
JLanguage::setDefault (   $lang)

Set the default language code.

Paramètres:
string$langThe language code.
Renvoie:
string Previous value.
Depuis:
11.1

Références $lang.

JLanguage::setIgnoredSearchWordsCallback (   $function)

Setter for the ignoredSearchWordsCallback function

Paramètres:
mixed$functionFunction name (string) or actual function for PHP 5.3 (function)
Renvoie:
mixed Function name (string) or the actual function for PHP 5.3 (function)
Depuis:
11.1

Références $function.

JLanguage::setLanguage (   $lang)

Set the language attributes to the given language.

Once called, the language still needs to be loaded using JLanguage::load().

Paramètres:
string$langLanguage code.
Renvoie:
string Previous value.
Depuis:
11.1

Références $lang.

JLanguage::setLowerLimitSearchWordCallback (   $function)

Setter for the lowerLimitSearchWordCallback function.

Paramètres:
mixed$functionFunction name (string) or actual function for PHP 5.3 (function)
Renvoie:
string|function Function name or the actual function for PHP 5.3.
Depuis:
11.1

Références $function.

JLanguage::setPluralSuffixesCallback (   $function)

Set the pluralSuffixes function.

Paramètres:
mixed$functionFunction name (string) or actual function for PHP 5.3 (function)
Renvoie:
mixed Function name or the actual function for PHP 5.3.
Depuis:
11.1

Références $function.

JLanguage::setSearchDisplayedCharactersNumberCallback (   $function)

Setter for the searchDisplayedCharactersNumberCallback function.

Paramètres:
string$functionThe name of the callback.
Renvoie:
mixed Function name (string) or the actual function for PHP 5.3 (function).
Depuis:
11.1

Références $function.

JLanguage::setTransliterator (   $function)

Set the transliteration function.

Paramètres:
mixed$functionFunction name (string) or the actual function for PHP 5.3 (function).
Renvoie:
mixed
Depuis:
11.1

Références $function.

JLanguage::setUpperLimitSearchWordCallback (   $function)

Setter for the upperLimitSearchWordCallback function

Paramètres:
string$functionThe name of the callback function.
Renvoie:
mixed Function name (string) or the actual function for PHP 5.3 (function).
Depuis:
11.1

Références $function.

JLanguage::transliterate (   $string)

Transliterate function

This method processes a string and replaces all accented UTF-8 characters by unaccented ASCII-7 "equivalents".

Paramètres:
string$stringThe string to transliterate.
Renvoie:
string The transliteration of the string.
Depuis:
11.1

Références null, JString\strtolower(), et JLanguageTransliterate\utf8_latin_to_ascii().

+ Voici le graphe d'appel pour cette fonction :


Documentation des données membres

JLanguage::$counter = 0
protected
JLanguage::$debug = false
protected
JLanguage::$default = 'en-GB'
protected
JLanguage::$errorfiles = array()
protected
JLanguage::$ignoredSearchWordsCallback = null
protected
JLanguage::$lang = null
protected
JLanguage::$languages = array()
staticprotected
JLanguage::$locale = null
protected
JLanguage::$lowerLimitSearchWordCallback = null
protected
JLanguage::$metadata = null
protected
JLanguage::$orphans = array()
protected
JLanguage::$override = array()
protected
JLanguage::$paths = array()
protected
JLanguage::$pluralSuffixesCallback = null
protected
JLanguage::$searchDisplayedCharactersNumberCallback = null
protected
JLanguage::$strings = null
protected
JLanguage::$transliterator = null
protected
JLanguage::$upperLimitSearchWordCallback = null
protected
JLanguage::$used = array()
protected

La documentation de cette classe a été générée à partir du fichier suivant :