Ka Extensions for OpenCart 4

This documentation applies to Ka Extensions for OpenCart 4.x only. It is not compatible with OpenCart 3.

Language
in component

Helps to get language data by ID or vice versa.

Table of Contents

Properties

Methods

getLanguage()  : object
Returns a cached language object for the language id, creating it if necessary.
getLanguageIdByCode()  : int|false
Returns the language id by its code.
__construct()  : mixed
Loads a language by id and creates an OpenCart language object with the Ka Extensions path and default file loaded.

Properties

$cache

public static mixed $cache = array()

$language

public mixed $language = array()

$language_code

protected mixed $language_code

$language_directory

protected mixed $language_directory

$language_filename

protected mixed $language_filename

Methods

getLanguage()

Returns a cached language object for the language id, creating it if necessary.

public static getLanguage(mixed $language_id) : object

$language_id — language id.

Parameters
$language_id : mixed
Return values
object —

OpenCart language object.

getLanguageIdByCode()

Returns the language id by its code.

public static getLanguageIdByCode(mixed $code) : int|false

$code — language code, e.g. "en-gb".

Parameters
$code : mixed
Return values
int|false —

Language id or false if not found.

__construct()

Loads a language by id and creates an OpenCart language object with the Ka Extensions path and default file loaded.

protected __construct(mixed $language_id) : mixed

$language_id — language id.

Parameters
$language_id : mixed

        
On this page

Search results