Exponent v2.7.2

expLang
in package

This is the class expLang

Tags
subpackage

Subsystems

Table of Contents

createNewLangFile()  : mixed
createNewLangInfoFile()  : mixed
getLangs()  : mixed
gettext()  : string
Get phrase from current language library
initialize()  : mixed
langList()  : mixed
saveCurrLangFile()  : mixed
Write the entire current phrase library (in memory) to it's language file
translate()  : mixed
updateCurrLangFile()  : int
Populate/expand missing phrases in current language file from default language file
utf8decode()  : mixed
utf8encode()  : mixed
writeTemplate()  : mixed
Add a new phrase to the default language file if WRITE_LANG_TEMPLATE turned on
writeTemplate_custom()  : mixed
Add a new phrase to the custom theme language file

Methods

createNewLangFile()

public static createNewLangFile(mixed $newlang) : mixed
Parameters
$newlang : mixed
Return values
mixed

createNewLangInfoFile()

public static createNewLangInfoFile(mixed $newlang, mixed $newauthor, mixed $newcharset, mixed $newlocale) : mixed
Parameters
$newlang : mixed
$newauthor : mixed
$newcharset : mixed
$newlocale : mixed
Return values
mixed

getLangs()

public static getLangs() : mixed
Return values
mixed

gettext()

Get phrase from current language library

public static gettext( $str) : string

Uses three constants for creating a language library

  • WRITE_LANG_TEMPLATE - to create/add phrases into the English (base) library
  • DEBUG_LANGUAGE - to log phrases not found in the English library
  • THEME_CUSTOM_LANGUAGE - to create/add phrases into a theme custom library for inclusion in custom modules
Parameters
$str :
Return values
string

initialize()

public static initialize() : mixed
Return values
mixed

langList()

public static langList() : mixed
Return values
mixed

saveCurrLangFile()

Write the entire current phrase library (in memory) to it's language file

public static saveCurrLangFile() : mixed
Return values
mixed

translate()

public static translate(mixed $text[, mixed $from = 'en' ][, mixed $to = 'fr' ]) : mixed
Parameters
$text : mixed
$from : mixed = 'en'
$to : mixed = 'fr'
Return values
mixed

updateCurrLangFile()

Populate/expand missing phrases in current language file from default language file

public static updateCurrLangFile() : int
Return values
int

utf8decode()

public static utf8decode(mixed $text) : mixed
Parameters
$text : mixed
Return values
mixed

utf8encode()

public static utf8encode(mixed $text) : mixed
Parameters
$text : mixed
Return values
mixed

writeTemplate()

Add a new phrase to the default language file if WRITE_LANG_TEMPLATE turned on

public static writeTemplate( $str) : mixed
Parameters
$str :
Return values
mixed

writeTemplate_custom()

Add a new phrase to the custom theme language file

public static writeTemplate_custom( $str) : mixed
Parameters
$str :
Return values
mixed

Search results