Constructor activating the default information of the language
JLanguage
__construct
([mixed $lang = null])
Redefinition of:
- JObject::__construct()
- Class constructor, overridden in descendant classes.
Get a matadata language property
mixed
get
(string $property, [mixed $default = null])
-
string
$property: The name of the property
-
mixed
$default: The default value
Redefinition of:
- JObject::get()
Get the Debug property
boolean
getDebug
()
Returns a reference to the global Language object, only creating it if it doesn't already exist.
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
array
getKnownLanguages
([string $basePath = JPATH_BASE])
-
string
$basePath: The basepath to use
Get the path to a language
string
getLanguagePath
([string $basePath = JPATH_BASE], [string $language = null], [boolean $addTrailingSlash = true])
-
string
$basePath: The basepath to use
-
string
$language: The language tag
-
boolean
$addTrailingSlash: Add a trailing slash to the pathname
Get locale property
string
getLocale
()
Returns a associative array holding the metadata
mixed
getMetadata
(string $lang)
-
string
$lang: The name of the language
Getter for Name
string
getName
([string $value = null])
-
string
$value: An optional value
Getter for PDF Font Name
string
getPdfFontName
()
Get for the langauge tag (as defined in RFC 3066)
string
getTag
()
Determines is a key exists
boolean
hasKey
(key $key)
-
key
$key: The key to check
Get the RTL property
boolean
isRTL
([mixed $value = null])
Loads a single langauge file and appends the results to the existing strings
void
load
([string $prefix = ''], [string $basePath = JPATH_BASE])
-
string
$prefix: The prefix
-
string
$basePath: The basepath to use $return boolean True, if the file has succesfully loaded.
Set the Debug property
void
setDebug
(mixed $debug)
Translator function, mimics the php gettext (alias _) function
string
_
(string $string, [boolean $jsSafe = false])
-
string
$string: The string to translate
-
boolean
$jsSafe: Make the result javascript safe
Loads a language file and returns the parsed values
mixed
_load
(string $filename)
-
string
$filename: The name of the file
parses INI type of files for language information
array
_parseINILanguageFiles
([string $dir = null])
-
string
$dir: Directory of files
Searches for language directories within a certain base dir
array
_parseLanguageFiles
([string $dir = null])
-
string
$dir: directory of files
Parse XML file for language information
array
_parseXMLLanguageFile
(string $path)
-
string
$path: Path to the xml files
Parses XML files for language information
array
_parseXMLLanguageFiles
([string $dir = null])
-
string
$dir: Directory of files
Inherited Methods
Inherited From JObject
JObject::__construct()
JObject::JObject()
JObject::get()
JObject::set()
JObject::toString()
JObject::__destruct()