LanguageFactory
Language package factory
since |
1.3.0 |
---|---|
package |
Joomla Framework |
Methods
getDefaultLanguage
Get the application's default language.
getDefaultLanguage() : string
since |
1.3.0 |
---|
Response
string
getLanguage
Creates a new Language instance based on the given parameters.
getLanguage(string lang = '', string path = '', bool debug = false) : \Joomla\Language\Language
since |
1.3.0 |
---|
Arguments
- lang
string
The language to use.- path
string
The base path to the language folder. This is required if creating a new instance.- debug
bool
The debug mode.
Response
\Joomla\Language\Language
getLanguageDirectory
Get the path to the directory containing the application's language folder.
getLanguageDirectory() : string
since |
1.3.0 |
---|
Response
string
getLocalise
Creates a new LocaliseInterface instance for the language.
getLocalise(string lang, string basePath = '') : \Joomla\Language\LocaliseInterface
since |
2.0.0-alpha |
---|
Arguments
- lang
string
Language to check.- basePath
string
Base path to the language folder.
Response
\Joomla\Language\LocaliseInterface
getStemmer
Creates a new StemmerInterface instance for the requested adapter.
getStemmer(string adapter) : \Joomla\Language\StemmerInterface
since |
1.3.0 |
---|---|
throws |
|
Arguments
- adapter
string
The type of stemmer to load.
Response
\Joomla\Language\StemmerInterface
getText
Retrieves a new Text object for a Language instance
getText(\Joomla\Language\Language|null language = null) : \Joomla\Language\Text
since |
2.0.0-alpha |
---|
Arguments
- language
\Joomla\Language\Language|null
An optional Language object to inject, otherwise the default object is loaded
Response
\Joomla\Language\Text
setDefaultLanguage
Set the application's default language
setDefaultLanguage(string language) : $this
since |
1.3.0 |
---|
Arguments
- language
string
Language code for the application's default language
Response
$this
setLanguageDirectory
Set the path to the directory containing the application's language folder
setLanguageDirectory(string directory) : $this
since |
2.0.0-alpha |
---|
Arguments
- directory
string
Path to the application's language folder
Response
$this
Properties
defaultLanguage
Application's default language
since |
1.3.0 |
---|
Type(s)
string
languageDirectory
Path to the directory containing the application's language folder
since |
2.0.0-alpha |
---|
Type(s)
string