claroline/claroline/inc/lib/language.lib.php File Reference

Go to the source code of this file.

Data Structures

class  language

Namespaces

namespace  CLUSR

Functions

 get_lang ($name, $var_to_replace=null)
if(!function_exists(
'cmp_string_by_length')) 
get_block ($name, $var_to_replace=null)
 get_locale ($localeInfoName)
 get_language_list ()
 get_language_to_display_list ()
 get_translation_of_language ($language)
 claro_display_preferred_language_form ()
 get_lang_month_name_list ($size='long')
 get_lang_weekday_name_list ($size='long')
 claro_disp_localised_date ($formatOfDate, $timestamp=-1)
 claro_html_localised_date ($formatOfDate, $timestamp=-1)
 seems_utf8 ($str)
 claro_utf8_encode ($str, $fromCharset= '')
 claro_utf8_decode ($str, $toCharset= '')
 claro_utf8_encode_array (&$var)

Function Documentation

claro_disp_localised_date ( formatOfDate,
timestamp = -1 
)

Display a date at localized format

Author:
Christophe Gesch� <gesche@ipm.ucl.ac.be>
Parameters:
formatOfDate see http://www.php.net/manual/en/function.strftime.php for syntax to use for this string I suggest to use the format you can find in trad4all.inc.php files
timestamp timestamp of date to format

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

claro_display_preferred_language_form (  ) 

Displays a form (drop down menu) so the user can select his/her preferred language. The form works with or without javascript TODO : need some refactoring there is a lot of function to get platform language

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

claro_html_localised_date ( formatOfDate,
timestamp = -1 
)

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

claro_utf8_decode ( str,
toCharset = '' 
)

Returns decoded utf-8 $str. No changes are made if it was not utf-8

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

claro_utf8_encode ( str,
fromCharset = '' 
)

Returns utf-8 encoded $str. No changes are made if it was already utf-8

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

claro_utf8_encode_array ( &$  var  ) 

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

if (!function_exists( 'cmp_string_by_length')) get_block ( name,
var_to_replace = null 
)

Get the translation of the block

Parameters:
$name block name
$var_to_remplace array with variables to replace
Returns:
block translation

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

get_lang ( name,
var_to_replace = null 
)

Translate strings to the current locale

When using get_lang(), try to put entire sentences and strings in one get_lang() call. This makes it easier for translators.

  $msg = get_lang('Hello %name',array('%name' => $username))
Parameters:
$name A string containing the English string to translate.
$var_to_replace An associative array of replacements to make after translation. Incidences of any key in this array are replaced with the corresponding value.
Returns:
The translated string.

Compare strings based on their length

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

get_lang_month_name_list ( size = 'long'  ) 

return an array with names of months

Parameters:
string $size size / format of strings 'long' for complete name 'short' or 'abbr' for abbreviation
Returns:
array of 12 strings (0 = january)

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

get_lang_weekday_name_list ( size = 'long'  ) 

return an array with names of weekdays

Parameters:
string $size size / format of strings 'long' for complete name 'short' or 'abbr' for abbreviation
Returns:
array of 7 strings (0 = monday)

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

get_language_list (  ) 

Displays a form (drop down menu) so the user can select his/her preferred language. The form works with or without javascript TODO : need some refactoring there is a lot of function to get platform language

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

get_language_to_display_list (  ) 

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

get_locale ( localeInfoName  ) 

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

get_translation_of_language ( language  ) 

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

seems_utf8 ( str  ) 

This function return true if $Str could be UTF-8, false otehrwise

function found @ http://www.php.net/manual/en/function.utf8-encode.php

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

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