Properties

$id

$id : 

Type

$name

$name : string

Type

string — Name

$iso_code

$iso_code : string

Type

string — 2-letter iso code

$language_code

$language_code : string

Type

string — 5-letter iso code

$date_format_lite

$date_format_lite : string

Type

string — date format http://http://php.net/manual/en/function.date.php with the date only

$date_format_full

$date_format_full : string

Type

string — date format http://http://php.net/manual/en/function.date.php with hours and minutes

$is_rtl

$is_rtl : boolean

Type

boolean — true if this language is right to left language

$active

$active : boolean

Type

boolean — Status

$definition

$definition : 

Type

$_checkedLangs

$_checkedLangs : array

Type

array — Languages cache

$_LANGUAGES

$_LANGUAGES : 

Type

$countActiveLanguages

$countActiveLanguages : 

Type

$webserviceParameters

$webserviceParameters : 

Type

$translationsFilesAndVars

$translationsFilesAndVars : 

Type

$_cache_language_installation

$_cache_language_installation : 

Type

Methods

__construct()

__construct(  $id = null,   $id_lang = null) 

Parameters

$id
$id_lang

getFields()

getFields() : array

Returns

array

moveToIso()

moveToIso(  $newIso) 

Move translations files after editing language iso code

Parameters

$newIso

add()

add(  $autodate = true,   $nullValues = false,   $only_add = false) 

Parameters

$autodate
$nullValues
$only_add

toggleStatus()

toggleStatus() 

checkFiles()

checkFiles() 

checkFilesWithIsoCode()

checkFilesWithIsoCode(mixed  $iso_code) 

This functions checks if every files exists for the language $iso_code.

Concerned files are those located in translations/$iso_code/ and translations/mails/$iso_code .

Parameters

mixed $iso_code

getFilesList()

getFilesList(  $iso_from,   $theme_from,   $iso_to = false,   $theme_to = false,   $select = false,   $check = false,   $modules = false) 

Parameters

$iso_from
$theme_from
$iso_to
$theme_to
$select
$check
$modules

loadUpdateSQL()

loadUpdateSQL() : boolean

loadUpdateSQL will create default lang values when you create a new lang, based on default id lang

Returns

boolean —

true if succeed

recurseDeleteDir()

recurseDeleteDir(  $dir) 

Parameters

$dir

delete()

delete() 

deleteSelection()

deleteSelection(  $selection) 

Parameters

$selection

getLanguages()

getLanguages(boolean  $active = true,   $id_shop = false) : array

Return available languages

Parameters

boolean $active

Select only active languages

$id_shop

Returns

array —

Languages

getLanguage()

getLanguage(  $id_lang) 

Parameters

$id_lang

getIsoById()

getIsoById(integer  $id_lang) : string

Return iso code from id

Parameters

integer $id_lang

Language ID

Returns

string —

Iso code

getIdByIso()

getIdByIso(string  $iso_code) : integer

Return id from iso code

Parameters

string $iso_code

Iso code

Returns

integer —

Language ID

getLanguageCodeByIso()

getLanguageCodeByIso(  $iso_code) 

Parameters

$iso_code

getLanguageByIETFCode()

getLanguageByIETFCode(  $code) 

Parameters

$code

getIsoIds()

getIsoIds(  $active = true) : array

Return array (id_lang, iso_code)

Parameters

$active

Returns

array —

Language (id_lang, iso_code)

copyLanguageData()

copyLanguageData(  $from,   $to) 

Parameters

$from
$to

loadLanguages()

loadLanguages() 

Load all languages in memory for caching

update()

update(  $nullValues = false) 

Parameters

$nullValues

checkAndAddLanguage()

checkAndAddLanguage(  $iso_code,   $lang_pack = false,   $only_add = false,   $params_lang = null) 

Parameters

$iso_code
$lang_pack
$only_add
$params_lang

isInstalled()

isInstalled(  $iso_code) 

Parameters

$iso_code

countActiveLanguages()

countActiveLanguages(  $id_shop = null) 

Parameters

$id_shop

downloadAndInstallLanguagePack()

downloadAndInstallLanguagePack(  $iso,   $version = null,   $params = null,   $install = true) 

Parameters

$iso
$version
$params
$install

isMultiLanguageActivated()

isMultiLanguageActivated(  $id_shop = null) : boolean

Check if more on than one language is activated

Parameters

$id_shop

Returns

boolean

getLanguagePackListContent()

getLanguagePackListContent(  $iso,   $tar) 

Parameters

$iso
$tar

updateModulesTranslations()

updateModulesTranslations(array  $modules_list) 

Parameters

array $modules_list

_generateFiles()

_generateFiles(  $newIso = null) 

Generate translations files

Parameters

$newIso

_getThemesList()

_getThemesList() : \array([theme

Return an array of theme

Returns

\array([theme —

dir] => array('name' => [theme name]))

_copyNoneFlag()

_copyNoneFlag(  $id) 

Parameters

$id