From 0e924ceed7a71ac343e929270f3e529ecf85f2a5 Mon Sep 17 00:00:00 2001 From: Gabriel Potkány Date: Thu, 6 Nov 2014 11:35:46 +0100 Subject: Ability to pass array of language files to Language Library similar to Loader Library --- user_guide_src/source/libraries/language.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'user_guide_src/source/libraries/language.rst') diff --git a/user_guide_src/source/libraries/language.rst b/user_guide_src/source/libraries/language.rst index 3014d8f09..6e7ef009f 100644 --- a/user_guide_src/source/libraries/language.rst +++ b/user_guide_src/source/libraries/language.rst @@ -66,6 +66,11 @@ file extension), and language is the language set containing it (ie, english). If the second parameter is missing, the default language set in your **application/config/config.php** file will be used. +You can also load multiple language files at the same time by passing an array of language files as first parameter. +:: + + $this->lang->load(array('filename1', 'filename2')); + .. note:: The *language* parameter can only consist of letters. Fetching a Line of Text @@ -110,7 +115,7 @@ Class Reference .. method:: load($langfile[, $idiom = ''[, $return = FALSE[, $add_suffix = TRUE[, $alt_path = '']]]]) - :param string $langfile: Language file to load + :param mixed $langfile: Language file to load as an string or an array with multiple files :param string $idiom: Language name (i.e. 'english') :param bool $return: Whether to return the loaded array of translations :param bool $add_suffix: Whether to add the '_lang' suffix to the language file name -- cgit v1.2.3-24-g4f1b From 2d7e05898ee33bee80acdd2aec9ebae8671c5dfc Mon Sep 17 00:00:00 2001 From: Gabriel Potkány Date: Fri, 7 Nov 2014 08:02:14 +0100 Subject: Comment polish --- user_guide_src/source/libraries/language.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide_src/source/libraries/language.rst') diff --git a/user_guide_src/source/libraries/language.rst b/user_guide_src/source/libraries/language.rst index 6e7ef009f..6949c11c9 100644 --- a/user_guide_src/source/libraries/language.rst +++ b/user_guide_src/source/libraries/language.rst @@ -115,7 +115,7 @@ Class Reference .. method:: load($langfile[, $idiom = ''[, $return = FALSE[, $add_suffix = TRUE[, $alt_path = '']]]]) - :param mixed $langfile: Language file to load as an string or an array with multiple files + :param mixed $langfile: Language file to load or array with multiple files :param string $idiom: Language name (i.e. 'english') :param bool $return: Whether to return the loaded array of translations :param bool $add_suffix: Whether to add the '_lang' suffix to the language file name -- cgit v1.2.3-24-g4f1b