Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 1 | ############### |
| 2 | Language Helper |
| 3 | ############### |
| 4 | |
| 5 | The Language Helper file contains functions that assist in working with |
| 6 | language files. |
| 7 | |
| 8 | .. contents:: Page Contents |
| 9 | |
| 10 | Loading this Helper |
| 11 | =================== |
| 12 | |
| 13 | This helper is loaded using the following code |
| 14 | |
| 15 | :: |
| 16 | |
| 17 | $this->load->helper('language'); |
| 18 | |
| 19 | The following functions are available: |
| 20 | |
| 21 | lang('language line', 'element id') |
| 22 | =================================== |
| 23 | |
| 24 | This function returns a line of text from a loaded language file with |
| 25 | simplified syntax that may be more desirable for view files than calling |
| 26 | `$this->lang->line()`. The optional second parameter will also output a |
| 27 | form label for you. Example |
| 28 | |
| 29 | :: |
| 30 | |
| 31 | echo lang('language_key', 'form_item_id'); |
| 32 | // becomes <label for="form_item_id">language_key</label> |
| 33 | |