Functions

Returns __(string $string, array $inserts)

The translation function accepts an English string and returns its translation to the active system language. If the given string is not available in the current dictionary the original English string will be returned. Given an optional $inserts array, the function will replace translation placeholders using vsprintf(). Since Symphony 2.3, it is also possible to have multiple translation of the same string according to the page namespace (i.e. the value returned by Symphony's getPageNamespace() method). In your lang file, use the $dictionary key as namespace and its value as an array of context-aware translations, as shown below:

$dictionary = array( [...]

	            'Create new' => 'Translation for Create New',

	    '/blueprints/datasources' => array(
	        'Create new' =>
	        'If we are inside a /blueprints/datasources/* page, this translation will be returned for the string'
	    ),

	    [...]
	
	      

);

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details