Language

Functions


// Retrieve all languages
get_language();

mixed get_language ( $options = [] )
$options array
  • id (int/array) - language id
  • alias (string/array) - language slug
  • status (int/array) - language status
  • order (string) - language order (by default order ASC)
  • where (mixed) - additional condition, details
Returns array of Language object collection or single Language object.

// Retrieve language by code = 'en'
get_language_by(['alias', 'en']);

mixed get_language_by ( $key, $value, $options = [] )
$key string
  • id - language id
  • alias - language slug
  • status - language author
$value mixed The value
$options array
  • id (int/array) - language id
  • alias (string/array) - language slug
  • status (int/array) - language status
  • order (string) - language order (by default order ASC)
  • where (mixed) - additional condition, details
Returns array of Language object collection or single Language object. On failure return an empty array and if value was the string or integer then returns null.

Language Object

$id int Language id
$status int Language status
$title string Language title
$order int Language order
$lang_code string Language code
$image string Language image
$date_format string Language date format
$date_time_format string Language date time format
$created_at string Language created date
$modified_at string Language edited date