Class Languages
Language management. Maintains all languages installed on the system and allows new languages to be installed.
All language codes are in ISO 639-1 ISO 3166-1 alpha-2 concatenated format (i.e. "en_us")
Copyright: Copyright (c) 2010, Phillips Data, Inc.
License: The Blesta License Agreement
Link: Blesta
Located at app/models/languages.php
Methods summary
public
|
|
public
array
|
|
public
array
|
|
public
|
#
add( integer $company_id, string $code )
Installs the given language file for the given company, if it exists |
public
|
|
public
array
|
#
getAllUninstallable( integer $company_id )
Retrieves a list of all languages that cannot be uninstalled for this company |
private
string
|
#
getNameFromFile( string $code )
Fetches the name of the language from the file system if the language exists and contains the language name file |
public
boolean
|
#
validateCodeExists( string $code, integer $company_id )
Validates whether or not the $code and $company_id combination already exists |
public
boolean
|
#
validateDefaultLang( string $code, integer $company_id )
Validates whether or not the $code and $company_id combination are the default language, or 'en_us' |
private
string
|
Methods inherited from AppModel
_()
,
boolToInt()
,
currencyToDecimal()
,
dateToUtc()
,
errors()
,
getPerPage()
,
ifSet()
,
loadCrypto()
,
setDefaultIfEmpty()
,
setPerPage()
,
setRulesIfSet()
,
strToBool()
,
systemDecrypt()
,
systemEncrypt()
,
systemHash()
,
truncateDecimal()
,
validateExists()
,
validateStateCountry()
Methods inherited from Model
affectedRows()
,
begin()
,
commit()
,
getConnection()
,
lastInsertId()
,
makeDSN()
,
prepare()
,
query()
,
rollBack()
,
setAttribute()
,
setFetchMode()