$smarty->set_filenames(array( 'header' => 'templates/header.tpl', 'footer' => 'templates/footer.tpl', 'content' => 'templates/content.tpl' ));
$lang = 'en'; $smarty->set_filenames(array( 'lang' => "lang/$lang.lang.php", ));This code sets the filename for the English language file to "lang/en.lang.php" and assigns it a key "lang" to use in Template. In this example, the package library used is the Smarty library which is a popular PHP template engine used for web development.