ossn.lib.languages.php File Reference

Go to the source code of this file.

Functions

 ossn_register_language ($code= '', $file)
 
 ossn_register_languages ($code, $params=array())
 
 ossn_locales ()
 
 ossn_print ($id= '', $args=array())
 
 ossn_default_load_locales ()
 
 ossn_load_json_locales ()
 
 ossn_get_installed_translations ($percentage=true)
 
 ossn_get_language_completeness ($language)
 
 ossn_get_missing_language_keys ($language)
 
 ossn_standard_language_codes ()
 
 ossn_load_available_languages ()
 
 ossn_get_available_languages ()
 

Function Documentation

ossn_default_load_locales ( )

Load system locales

Returns
void

Definition at line 89 of file ossn.lib.languages.php.

ossn_get_available_languages ( )

Get list of all available languages

Returns
array

Definition at line 368 of file ossn.lib.languages.php.

ossn_get_installed_translations (   $percentage = true)

Return an array of installed translations as an associative array "two letter code" => "native language name".

Returns
array

Definition at line 121 of file ossn.lib.languages.php.

ossn_get_language_completeness (   $language)

Return the level of completeness for a given language code (compared to english)

Parameters
string$languageLanguage
Returns
int

Definition at line 143 of file ossn.lib.languages.php.

ossn_get_missing_language_keys (   $language)

Return the translation keys missing from a given language, or those that are identical to the english version.

Parameters
string$languageThe language
Returns
mixed

Definition at line 167 of file ossn.lib.languages.php.

ossn_load_available_languages ( )

Load all available languages

Returns
void

Definition at line 339 of file ossn.lib.languages.php.

ossn_load_json_locales ( )

Load json locales.

Returns
string|false or false

Definition at line 105 of file ossn.lib.languages.php.

ossn_locales ( )

Get registered language codes;

Returns
array

Definition at line 45 of file ossn.lib.languages.php.

ossn_print (   $id = '',
  $args = array() 
)

Print a locale;

Parameters
string$idId of locale;
array$argsArray;
Returns
string

Definition at line 68 of file ossn.lib.languages.php.

ossn_register_language (   $code = '',
  $file 
)

Open Source Social Network

Source Social Network

Author
Open Social Website Core Team [email protected][email protected]info[email protected]rmati[email protected]kon.[email protected]com

Definition at line 18 of file ossn.lib.languages.php.

ossn_register_languages (   $code,
  $params = array() 
)

Get a languages strings;

Parameters
string$codeCode of language;
array$paramsTranslations;
Returns
void;

Definition at line 32 of file ossn.lib.languages.php.

ossn_standard_language_codes ( )

Get list of ISO 639-1 language codes

Returns
array

Definition at line 189 of file ossn.lib.languages.php.