<?php

/*
 * *************************************************
 * Copyright (C) 2020 Earworks.                    *
 * Codeigniter Project Template Modification       *
 * Please contact our email for more information : *
 * contact@earworks.co.id                          *
 * *************************************************
 */

defined('BASEPATH') OR exit('No direct script access allowed');

/**
 * Lang
 *
 * Fetches a language variable and optionally outputs a form label
 *
 * @param	string	$line		The language line
 * @param	string	$for		The "for" value (id of the form element)
 * @param	array	$attributes	Any additional HTML attributes
 * @return	string
 */
function lang($line, $template = array(), $for = '', $attributes = array()) {
    $line = get_instance()->lang->line($line, $template);

    if ($for !== '') {
        $line = '<label for="' . $for . '"' . _stringify_attributes($attributes) . '>' . $line . '</label>';
    }

    return $line;
}
