claroline/claroline/admin/xtra/sdk/lang/language.lib.php File Reference

Go to the source code of this file.

Functions

 get_time ()
 glance_through_dir_lang ($dirPath, $languageName)
 retrieve_lang_var ($fileName, $languageName)
 initialize_lang_var ()
 store_lang_var ($languageVarList, $sourceFileName, $languageName)
 google_translation ($from, $to, $string)
 scan_dir ($dirname, $recurse=FALSE)
 is_scannable ($filePath, $additionnalForbiddenDirNameList=array(), $additionnalForbiddenFileSuffixList=array())
 store_lang_used_in_script ($languageVarList, $sourceFileName)
 detect_included_files (&$tokenList)
 get_lang_vars_from_file ($file)
 detect_get_lang ($fileContent)
 detect_lang_var ($tokenList)
 is_a_lang_var ($token)
 is_a_lang_varname ($var)
 get_real_path_from_statement ($statementString, $parsedFilePath)
 compose_language_production_filename ($file)
 get_lang_path_list ($path_lang)
 load_array_translation ($language)
 build_translation_line_file ($key, $value)
 get_lang_vars_from_deffile ($file)
 initialize_lang_info ()
 store_lang_info ($languagePath, $languageName, $clarolineVersion, $scanned)
 read_lang_info ($languageId)

Function Documentation

build_translation_line_file ( key,
value 
)

Definition at line 729 of file language.lib.php.

compose_language_production_filename ( file  ) 

Definition at line 647 of file language.lib.php.

detect_get_lang ( fileContent  ) 

Extract the parameter name of get_lang function from a script

Returns:
- array $languageVarList
Parameters:
- array $tokenList

Definition at line 456 of file language.lib.php.

detect_included_files ( &$  tokenList  ) 

Detect included files in the script

Returns:
- array $includeFileList list of included file
Parameters:
- array $tokenList list of token from a script

Definition at line 360 of file language.lib.php.

detect_lang_var ( tokenList  ) 

Extract language variables from a script

Returns:
- array $languageVarList
Parameters:
- array $tokenList

Definition at line 545 of file language.lib.php.

get_lang_path_list ( path_lang  ) 

Definition at line 670 of file language.lib.php.

get_lang_vars_from_deffile ( file  ) 

Get the list of language variables in a script and its included files

Returns:
- array $languageVarList or boolean FALSE
Parameters:
- string $file

Definition at line 748 of file language.lib.php.

get_lang_vars_from_file ( file  ) 

Get the list of language variables in a script and its included files

Returns:
- array $languageVarList or boolean FALSE
Parameters:
- string $file

Definition at line 432 of file language.lib.php.

get_real_path_from_statement ( statementString,
parsedFilePath 
)

Build the real path of the script

Returns:
- string $realPath
Parameters:
- string $statementString
- string $parsedFilePath

Definition at line 626 of file language.lib.php.

get_time (  ) 

Get the currently time

Returns:
- time in microseconds

Definition at line 21 of file language.lib.php.

glance_through_dir_lang ( dirPath,
languageName 
)

Browse path with language files and extract variables name and their values (retrieve_lang_vars function). Script used in extract_var_from_lang_files.php

Author:
- Hugues Peeters <peeters@ipm.ucl.ac.be>
Parameters:
- $dirPath - directory path
- $languageName - language name of the translation file

Definition at line 40 of file language.lib.php.

google_translation ( from,
to,
string 
)

Definition at line 170 of file language.lib.php.

initialize_lang_info (  ) 

store the lang variables in a centralized repository

Author:
- Hugues Peeters <peeters@ipm.ucl.ac.be>
Parameters:
- array $languageVarList - list of the language variable 'key' is the variable name, 'content' is the variable content
- string $sourceFileName - file name from where the variables are coming
- string $languageName - name of the language translation

Definition at line 807 of file language.lib.php.

initialize_lang_var (  ) 

Definition at line 115 of file language.lib.php.

is_a_lang_var ( token  ) 

Check if a token is a language variable

Returns:
- boolean
Parameters:
- token $token

Definition at line 571 of file language.lib.php.

is_a_lang_varname ( var  ) 

Check if a token is a language variable

Returns:
- boolean
Parameters:
- token $token

Definition at line 593 of file language.lib.php.

is_scannable ( filePath,
additionnalForbiddenDirNameList = array(),
additionnalForbiddenFileSuffixList = array() 
)

Check if the file or directory is an element scannable

Returns:
- boolean
Parameters:
- string
- array
- array

Definition at line 253 of file language.lib.php.

load_array_translation ( language  ) 

Definition at line 696 of file language.lib.php.

read_lang_info ( languageId  ) 

store the lang variables in a centralized repository

Author:
- Hugues Peeters <peeters@ipm.ucl.ac.be>
Parameters:
- array $languageVarList - list of the language variable 'key' is the variable name, 'content' is the variable content
- string $sourceFileName - file name from where the variables are coming
- string $languageName - name of the language translation

Definition at line 866 of file language.lib.php.

retrieve_lang_var ( fileName,
languageName 
)

Get defined language variables of the script and store them.

Author:
- Hugues Peeters <peeters@ipm.ucl.ac.be>
Parameters:
- string $fileName - language file where to retrieve get_lang(' variable') translation
- string $languageName - language name of the translation

Definition at line 103 of file language.lib.php.

scan_dir ( dirname,
recurse = FALSE 
)

Browse a dirname and returns all files and subdirectories

Returns:
- array('files'=>array(), 'directories=>array())
Parameters:
- string $dirname
- boolean $recurse

Definition at line 200 of file language.lib.php.

store_lang_info ( languagePath,
languageName,
clarolineVersion,
scanned 
)

store the lang variables in a centralized repository

Author:
- Hugues Peeters <peeters@ipm.ucl.ac.be>
Parameters:
- array $languageVarList - list of the language variable 'key' is the variable name, 'content' is the variable content
- string $sourceFileName - file name from where the variables are coming
- string $languageName - name of the language translation

Definition at line 835 of file language.lib.php.

store_lang_used_in_script ( languageVarList,
sourceFileName 
)

Store the name and sourceFile of the language variable in mysql table

Parameters:
- array $languageVarList
- string $sourcFileName

Definition at line 330 of file language.lib.php.

store_lang_var ( languageVarList,
sourceFileName,
languageName 
)

store the lang variables in a centralized repository

Author:
- Hugues Peeters <peeters@ipm.ucl.ac.be>
Parameters:
- array $languageVarList - list of the language variable 'key' is the variable name, 'content' is the variable content
- string $sourceFileName - file name from where the variables are coming
- string $languageName - name of the language translation

Definition at line 148 of file language.lib.php.

Generated on Tue Jun 8 12:28:36 2010 for Claroline API by  doxygen 1.6.3