LanguageFactory

Language package factory

since

1.3.0

package

Joomla Framework

Methods

getDefaultLanguage

Get the application's default language.

getDefaultLanguage() : 
since

1.3.0

Response

string

getLanguage

Creates a new Language instance based on the given parameters.

getLanguage( lang = '',  path = '',  debug = false) : \Joomla\Language\Language
since

1.3.0

Arguments

lang

stringThe language to use.

path

stringThe base path to the language folder. This is required if creating a new instance.

debug

boolThe debug mode.

Response

Language

getLanguageDirectory

Get the path to the directory containing the application's language folder.

getLanguageDirectory() : 
since

1.3.0

Response

string

getLocalise

Creates a new LocaliseInterface instance for the language.

getLocalise( lang,  basePath = '') : \Joomla\Language\LocaliseInterface
since

2.0

Arguments

lang

stringLanguage to check.

basePath

stringBase path to the language folder.

Response

LocaliseInterface

getStemmer

Creates a new StemmerInterface instance for the requested adapter.

getStemmer( adapter) : \Joomla\Language\StemmerInterface
since

1.3.0

throws

RuntimeExceptionon invalid stemmer

Arguments

adapter

stringThe type of stemmer to load.

Response

StemmerInterface

getText

Retrieves a new Text object for a Language instance

getText(\Joomla\Language\Language|null language = null) : \Joomla\Language\Text
since

2.0

Arguments

language

Language|nullAn optional Language object to inject, otherwise the default object is loaded

Response

Text

setDefaultLanguage

Set the application's default language

setDefaultLanguage( language) : 
since

1.3.0

Arguments

language

stringLanguage code for the application's default language

Response

$this

setLanguageDirectory

Set the path to the directory containing the application's language folder

setLanguageDirectory( directory) : 
since

2.0

Arguments

directory

stringPath 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

Type(s)

string