For a little more explanation... we put all hard-coded text into language variables in one location. This makes it easier for users to create additional language arrays (or files containing complete arrays) so that all hard-coded text in the site will display in another language. It also allows us to display the same text in any number of function locations in any engine files... by inserting the variable name in functions where we want the text to display.
All variables start with a $-sign. As an example, we create the following variable string within the language array... to display the word "home" The part to the left of the = sign contains the variable name, and the part to the right contains the variable value... the text to be displayed:
$l['home'] = 'Home';
And, we insert the variable into code with - l('home')
depending on where the variable is to be located within code strings. It then displays the value wherever it is located.
A language variable can contain large amounts of text... several paragraphs... provided it is all contained within the single-quotes. You can make up your own language variables for any purpose.
On your second question, you can learn more about the structure of the html_input strings by downloading the sNews 1.6 Developers' Edition
of the snews.php (engine) file. Mika, who worked with Luka and contributed significantly to the development of version 1.6, was very generous in adding lots of comments to the file to explain what goes on within each function. When you open the file in your 'good' code editor, search for // FORM GENERATOR
and that will take you to function html_input
. You will see... in the first string of the function... that it contains a total of 15 variables. Every html_input in the snews.php file contains 15 value containers, and each of them relates to a variable in the noted function. If some are not used in a given string, they are left empty and only those used have values in them.