Function __global->lang_code_to_static_content

Definitions

sources/lang3.php

  • Take a static 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
$str ID_TEXT No No required parameter N/A N/A The static string
$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)

Returns

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

Preview

Code (PHP)

/**
 * Take a static 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 $str The static string
 * @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)
 * @return array The content language string save fields
 */

function lang_code_to_static_content(string $field_name, string $str, bool $comcode = false, int $level = 2, ?object $db = null) : array