$lang = loadLang('english', 'lang/'); echo $lang['welcome_message'];
$lang = loadLang('spanish', 'translations/'); echo $lang['contact_us'];In this example, the loadLang() function loads the 'spanish.php' file from the 'translations' directory and stores the language values in the $lang variable. The 'contact_us' value from the language file is then echoed/printed on the web page. Package Library: This function could be a part of a package/library for multi-lingual website development.