include/SugarObjects/LanguageManager.php

Show: inherited
Table of Contents

Functions

functiontranslated_prefix(  $key ) : void

Parameters
Name Type Description
$key

\LanguageManager

Package: SugarCRM

Language files management

Api
 

Methods

methodpublic_clearCache( string $module_dir = '', string $lang ) : void

PRIVATE function used within clearLanguageCache so we do not repeat logic

Parameters
Name Type Description
$module_dir string

module_dir the module_dir to clear

$lang string

lang the name of the language file we are clearing this is for sugar_cache

methodpublicaddTemplate(  $module,  $lang,  $template ) : void

Parameters
Name Type Description
$module
$lang
$template
methodpublicclearLanguageCache( string $module_dir = '', string $lang = '' ) : void

clear out the language cache.

Parameters
Name Type Description
$module_dir string

module_dir the module_dir to clear, if not specified then clear clear language cache for all modules.

$lang string

lang the name of the object we are clearing this is for sugar_cache

methodpubliccreateLanguageFile( \module $module, \templates $templates = array('default'),  $refresh = false ) : void

Called from VardefManager to allow for caching a lang file for a module

Parameters
Name Type Description
$module \module
  • the name of the module we are working with
$templates \templates
  • an array of templates this module uses
$refresh
methodpublicgetLanguageCacheKey(  $module,  $lang ) : string
static

Return the cache key for the module language definition

Parameters
Name Type Description
$module
$lang
Returns
Type Description
string
Details
Static
 
methodpublicloadModuleLanguage(  $module,  $lang,  $refresh = false ) : void

Parameters
Name Type Description
$module
$lang
$refresh
methodpublicloadTemplateLanguage( \module $module, \templates $templates, \lang $lang, \loaded_mod_strings $loaded_mod_strings ) : void

Load the module tempalte lauguage files

Parameters
Name Type Description
$module \module
  • the name of the module we are working with
$templates \templates
  • an array of templates this module uses
$lang \lang
  • current language this module use
$loaded_mod_strings \loaded_mod_strings
  • the string that we will add the module template language into
methodpublicrefreshLanguage( string $module, string $lang,  $loaded_mod_strings = array(), array $additional_search_paths = null ) : void

Given a module, search all of the specified locations, and any others as specified in order to refresh the cache file

Parameters
Name Type Description
$module string

the given module we want to load the vardefs for

$lang string

the given language we wish to load

$loaded_mod_strings
$additional_search_paths array

an array which allows a consumer to pass in additional vardef locations to search

methodpublicremoveJSLanguageFiles( ) : void
static

Remove any cached js language strings.

Details
Static
 
methodpublicsaveCache(  $module,  $lang,  $loaded_mod_strings,  $additonal_objects = array() ) : void

Parameters
Name Type Description
$module
$lang
$loaded_mod_strings
$additonal_objects
Documentation was generated by DocBlox 0.18.1.