\TranslateCore

Summary

Methods
Properties
Constants
getAdminTranslation()
getGenericAdminTranslation()
getModuleTranslation()
getPdfTranslation()
checkAndReplaceArgs()
postProcessTranslation()
smartyPostProcessTranslation()
ppTags()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

getAdminTranslation()

getAdminTranslation(  $string, string  $class = 'AdminTab', boolean  $addslashes = false, boolean  $htmlentities = true,   $sprintf = null) : string

Get a translation for an admin controller

Parameters

$string
string $class
boolean $addslashes
boolean $htmlentities
$sprintf

Returns

string

getGenericAdminTranslation()

getGenericAdminTranslation(  $string, null  $key = null,   $lang_array) : string

Return the translation for a string if it exists for the base AdminController or for helpers

Parameters

$string

string to translate

null $key

md5 key if already calculated (optional)

$lang_array

global array of admin translations

Returns

string —

translation

getModuleTranslation()

getModuleTranslation(string|\Module  $module, string  $string, string  $source,   $sprintf = null,   $js = false) : string

Get a translation for a module

Parameters

string|\Module $module
string $string
string $source
$sprintf
$js

Returns

string

getPdfTranslation()

getPdfTranslation(string  $string) : string

Get a translation for a PDF

Parameters

string $string

Returns

string

checkAndReplaceArgs()

checkAndReplaceArgs(  $string,   $args) : string

Check if string use a specif syntax for sprintf and replace arguments if use it

Parameters

$string
$args

Returns

string

postProcessTranslation()

postProcessTranslation(  $string,   $params) 

Perform operations on translations after everything is escaped and before displaying it

Parameters

$string
$params

smartyPostProcessTranslation()

smartyPostProcessTranslation(  $string,   $params) 

Compatibility method that just calls postProcessTranslation.

Parameters

$string
$params

ppTags()

ppTags(  $string,   $tags) 

Helper function to make calls to postProcessTranslation more readable.

Parameters

$string
$tags