Skip to content

Latest commit

 

History

History
209 lines (111 loc) · 4.52 KB

class.TranslateCore.md

File metadata and controls

209 lines (111 loc) · 4.52 KB

Class TranslateCore

Contents

Methods

Methods

checkAndReplaceArgs

string TranslateCore::checkAndReplaceArgs($string, $args)

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

Arguments

  • $string mixed
  • $args mixed

getAdminTranslation

string TranslateCore::getAdminTranslation($string, string $class, boolean $addslashes, boolean $htmlentities, $sprintf)

Get a translation for an admin controller

Arguments

  • $string mixed
  • $class string
  • $addslashes boolean
  • $htmlentities boolean
  • $sprintf mixed

getGenericAdminTranslation

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

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

Arguments

  • $string mixed - string to translate
  • $key null - md5 key if already calculated (optional)
  • $lang_array mixed - global array of admin translations

getModuleTranslation

string TranslateCore::getModuleTranslation(string|\Module $module, string $string, string $source, $sprintf, $js)

Get a translation for a module

Arguments

  • $module string|string
  • $string string
  • $source string
  • $sprintf mixed
  • $js mixed

getPdfTranslation

string TranslateCore::getPdfTranslation(string $string)

Get a translation for a PDF

Arguments

  • $string string

postProcessTranslation

mixed TranslateCore::postProcessTranslation($string, $params)

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

Arguments

  • $string mixed
  • $params mixed

ppTags

mixed TranslateCore::ppTags($string, $tags)

Helper function to make calls to postProcessTranslation more readable.

Arguments

  • $string mixed
  • $tags mixed

smartyPostProcessTranslation

mixed TranslateCore::smartyPostProcessTranslation($string, $params)

Compatibility method that just calls postProcessTranslation.

Arguments

  • $string mixed
  • $params mixed