JLanguage
Languages/translation handler class
Located in /joomla/language/language.php (line 25)
JObject (Subpackage Base)
![]()
JLanguage (Subpackage Language)
boolean
load
([string $extension = 'joomla'], [string $basePath = JPATH_BASE], [string $lang = null], [boolean $reload = false])
boolean
$_debug
= false (line 34)
Debug language, If true, highlights if string isn't found
string
$_default
= 'en-GB' (line 45)
The default language
The default language is used when a language file in the requested language does not exist.
string
$_lang
= null (line 72)
The language to load
array
$_metadata
= null (line 63)
Array holding the language metadata
array
$_orphans
= array() (line 54)
An array of orphaned text
array
$_paths
= array() (line 81)
List of language files that have been loaded
array
$_strings
= null (line 90)
Translations
array
$_used
= array() (line 99)
An array of used text, used during debugging
Inherited Variables
Inherited from JObject
JObject::$_errors
Constructor activating the default information of the language
- $lang
- JObject::__construct()
- Class constructor, overridden in descendant classes.
Check if a language exists
This is a simple, quick check for the directory that should contain language files for the given user.
- string $lang: Language to check
- string $basePath: Optional path to check
Get a matadata language property
- string $property: The name of the property
- mixed $default: The default value
- JObject::get()
- Returns a property of the object or the default value if the property is not set.
Returns a reference to a language object
This method must be invoked as:
$browser = &JLanguage::getInstance([$lang);
- string $lang: The language to use.
Returns a list of known languages for an area
- string $basePath: The basepath to use
Get the path to a language
- string $basePath: The basepath to use
- string $language: The language tag
Returns a associative array holding the metadata
- string $lang: The name of the language
Get a list of language files that have been loaded
- string $extension: An option extension name
Get the list of used strings
Used strings are those strings requested and found either as a string or a constant
Loads a single language file and appends the results to the existing strings
- string $extension: The extension for which a language file should be loaded
- string $basePath: The basepath to use
- string $lang: The language to load, default null for the current language
- boolean $reload: Flag that will force a language to be reloaded if set to true
Set the language attributes to the given language
Once called, the language still needs to be loaded using JLanguage::load()
- string $lang: Language code
Transliterate function
This method processes a string and replaces all accented UTF-8 characters by unaccented ASCII-7 "equivalents"
- string $string: The string to transliterate
Translate function, mimics the php gettext (alias _) function
- string $string: The string to translate
- boolean $jsSafe: Make the result javascript safe
Searches for language directories within a certain base dir
- string $dir: directory of files
Parse XML file for language information
- string $path: Path to the xml files
Parses XML files for language information
- string $dir: Directory of files
Inherited Methods
Inherited From JObject
JObject::JObject()
JObject::__construct()
JObject::get()
JObject::getError()
JObject::getErrors()
JObject::getProperties()
JObject::getPublicProperties()
JObject::set()
JObject::setError()
JObject::setProperties()
JObject::toString()
Documentation generated on Sat, 14 Nov 2009 11:15:25 +0000 by phpDocumentor 1.3.1



