Function __global->lang_code_to_default_content

Definitions

sources/lang3.php

  • Take a language string and save it into a content language string in the database, for all translations.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$field_name ID_TEXT No No required parameter N/A N/A The field name
$code ID_TEXT No No required parameter N/A N/A The language string codename
$comcode boolean No No False N/A N/A Whether the given codes value is to be parsed as Comcode
$level integer No No 2 N/A N/A The level of importance this content language string holds
$db ?object No No Null N/A N/A The database connector to use (null: standard site connector)
$parameter1 ?mixed No No Null N/A N/A The first parameter [string or Tempcode] (replaces {1}) (null: none)
$parameter2 ?mixed No No Null N/A N/A The second parameter [string or Tempcode] (replaces {2}) (null: none)
$parameter3 ?mixed No No Null N/A N/A The third parameter (replaces {3}). May be an array of [of string or Tempcode], to allow any number of additional args (null: none)

Returns

  • The content language string save fields
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Take a language string and save it into a content language string in the database, for all translations.
 *
 * @param  ID_TEXT $field_name The field name
 * @param  ID_TEXT $code The language string codename
 * @param  boolean $comcode Whether the given codes value is to be parsed as Comcode
 * @param  integer $level The level of importance this content language string holds
 * @param  ?object $db The database connector to use (null: standard site connector)
 * @param  ?mixed $parameter1 The first parameter [string or Tempcode] (replaces {1}) (null: none)
 * @param  ?mixed $parameter2 The second parameter [string or Tempcode] (replaces {2}) (null: none)
 * @param  ?mixed $parameter3 The third parameter (replaces {3}). May be an array of [of string or Tempcode], to allow any number of additional args (null: none)
 * @return array The content language string save fields
 */

function lang_code_to_default_content(string $field_name, string $code, bool $comcode = false, int $level = 2, ?object $db = null, $parameter1 = null, $parameter2 = null, $parameter3 = null) : array