LanguageHelper
class LanguageHelper
Language helper class
Methods
Builds a list of the system languages which can be used in a select option
Tries to detect the language.
Get available languages
Get a list of installed languages.
Get a list of content languages.
Parse strings from a language file.
Save strings to a language file.
Checks if a language exists.
Returns an associative array holding the metadata.
Returns a list of known languages for an area
Get the path to a language
Searches for language directories within a certain base dir.
Parse XML file for language information.
Details
static
array
createLanguageList(
string $actualLanguage,
string $basePath = JPATH_BASE,
boolean $caching = false,
boolean $installed = false)
Builds a list of the system languages which can be used in a select option
static
array
getInstalledLanguages(
integer $clientId = null,
boolean $processMetaData = false,
boolean $processManifest = false,
string $pivot = 'element',
string $orderField = null,
string $orderDirection = null)
Get a list of installed languages.
static
array
getContentLanguages(
array $publishedStates = array(1),
boolean $checkInstalled = true,
string $pivot = 'lang_code',
string $orderField = null,
string $orderDirection = null)
Get a list of content languages.
static
boolean
parseIniFile(
string $fileName,
boolean $debug = false)
Parse strings from a language file.
static
boolean
exists(
string $lang,
string $basePath = JPATH_BASE)
Checks if a language exists.
This is a simple, quick check for the directory that should contain language files for the given user.
static
array
getKnownLanguages(
string $basePath = JPATH_BASE)
Returns a list of known languages for an area
static
string
getLanguagePath(
string $basePath = JPATH_BASE,
string $language = null)
Get the path to a language