Documentation

functions.php

Tags
file

CiviCRM is generally organized around classes, but there are a handful of global functions. Declare them here.

Table of Contents

Functions

ts()  : string
Short-named function for string translation, defined in global scope so it's available everywhere.

Functions

ts()

Short-named function for string translation, defined in global scope so it's available everywhere.

ts(string $text[, array<string|int, mixed> $params = [] ]) : string
Parameters
$text : string

String for translating. Ex: 'Hello, %1!'

$params : array<string|int, mixed> = []

An array of additional parameters, as per crm_translate(). Ex: [1 => 'Dave']

Tags
see
CRM_Core_I18n::crm_translate()
Return values
string

The translated string Ex: '¡Buenos días Dave!`


        
On this page

Search results