Language Helper¶
The Language Helper file contains functions that assist in working with language files.
Loading this Helper¶
This helper is loaded using the following code:
$this->load->helper('language');
利用できる機能¶
The following functions are available:
-
lang
($line[, $for = ''[, $attributes = array()]])¶ Parameters: - $line (string) – Language line key
- $for (string) – HTML “for” attribute (ID of the element we’re creating a label for)
- $attributes (array) – Any additional HTML attributes
Returns: HTML-formatted language line label
Return type: string
This function returns a line of text from a loaded language file with simplified syntax that may be more desirable for view files than
CI_Lang::line()
.Example:
echo lang('language_key', 'form_item_id', array('class' => 'myClass')); // Outputs: <label for="form_item_id" class="myClass">Language line</label>