summaryrefslogtreecommitdiffstats
path: root/system/core/Lang.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/core/Lang.php')
-rw-r--r--system/core/Lang.php28
1 files changed, 15 insertions, 13 deletions
diff --git a/system/core/Lang.php b/system/core/Lang.php
index 601348aa4..251cf6ef1 100644
--- a/system/core/Lang.php
+++ b/system/core/Lang.php
@@ -39,19 +39,19 @@ class CI_Lang {
/**
* List of translations
*
- * @var array
+ * @var array
*/
public $language = array();
/**
* List of loaded language files
*
- * @var array
+ * @var array
*/
public $is_loaded = array();
/**
- * Initialize language class
+ * Class constructor
*
* @return void
*/
@@ -65,12 +65,13 @@ class CI_Lang {
/**
* Load a language file
*
- * @param mixed $langile the name of the language file to be loaded
- * @param string $idiom = '' the language (english, etc.)
- * @param bool $return = FALSE return loaded array of translations
- * @param bool $add_suffix = TRUE add suffix to $langfile
- * @param string $alt_path = '' alternative path to look for language file
- * @return mixed
+ * @param mixed $langfile Language file name
+ * @param string $idiom Language name (english, etc.)
+ * @param bool $return Whether to return the loaded array of translations
+ * @param bool $add_suffix Whether to add suffix to $langfile
+ * @param string $alt_path Alternative path to look for the language file
+ *
+ * @return void|string[] Array containing translations, if $return is set to TRUE
*/
public function load($langfile, $idiom = '', $return = FALSE, $add_suffix = TRUE, $alt_path = '')
{
@@ -119,7 +120,6 @@ class CI_Lang {
}
}
-
if ( ! isset($lang) OR ! is_array($lang))
{
log_message('error', 'Language file contains no data: language/'.$idiom.'/'.$langfile);
@@ -146,10 +146,12 @@ class CI_Lang {
// --------------------------------------------------------------------
/**
- * Fetch a single line of text from the language array
+ * Language line
+ *
+ * Fetches a single line of text from the language array
*
- * @param string $line the language line
- * @return string
+ * @param string $line Language line key
+ * @return string Translation
*/
public function line($line = '')
{