php3guest is capable of using different GUI languages for different client. A default language should be set in php3guestrc, but an arbitrary
number of other languages may co-exist.
The languages are supported via language modules, which are php3 scripts setting up texts for a couple of
used variables. A couple of sample language modules are provided by the php3guest distribution, but you are
encouraged to write your own modules (and send them to me
to include them in further distributions). I use another "language" file, as the language file also contains
the menus, page headers and footers, so you probably will write your own one.
The primary language is set in php3guestrc via the variable "$defaultLanguage"; however,
there are additional possibilities for setting another language for a special client: the URL
parameter "language=xxx" (e.g. "http://www.guestbook.com/?language=spanish") will select another language for
this special session.
Another option for setting a different language are cookies (uh... I love php3 *:o):
If there is a cookie called "language", it will be used instead of the default or passed language
(i.e. the cookie has priority over the URL parameter!) A sample "setcookie.php3" and "delcookie.php3" are
included in the distribution file.
Variable |
Sensible default |
Explanation |
guestbookMenu |
'<a href="../guestbook/">[View guestbook]</a>
<a href="../guestbook/?act=insert">[Sign guestbook]</a>' |
This variable is referenced by my sample pageFooter and pageHeader. You will not see it's
contents displayed unless you reference it from
any other variable. Can and should be used to display a menu to submit and view entries in the guestbook. |
pageFooter |
$guestbookMenu.'</body></html>' |
This variable holds the HTML to be put below the contents of the guestbook itself. May (probably will) be multilined and will probably have to
contain tags like </body> and </html>. |
pageHeader |
'<html><head><title>Guestbook</title></head>
<body><h1>Guestbook</h1><p>'.$guestbookMenu |
This variable holds the HTML to be put above the guestbook itself. May (probably will) be multilined and will probably have to
contain tags like <title>, <body> and <html>. |
insertGreeting |
'Hey! Leave me a little message!' |
Little (or even longer, if you like) text message displayed above the submission form |
labelInsertName |
'Name: ' |
Label for the 'name'-field in the submission form |
labelInsertMail |
'Mail address: ' |
Label for the 'mail'-field in the submission form |
labelInsertURL |
'URL of your Homepage, if any: ' |
Label for the 'url'-field in the submission form |
labelInsertHP |
'Name of your Homepage, if any: ' |
Label for the 'hp'-field in the submission form |
labelInsertPrivate |
'Make this entry viewable for the owner only? ' |
Label for the 'private'-field in the submission form |
labelInsertDate |
'Date: ' |
Label for the 'date'-field in the submission page |
labelInsertEntry |
'Your Comments: ' |
Label for the 'entry'-field in the submission form |
labelInsertSubmit |
'Submit' |
Label for the 'submit'-button in the submission form |
labelInsertReset |
'Reset' |
Label for the 'reset'-button in the submission form |
labelViewEntryIDs |
'Entries: ' |
What to display before and after the next- and previous-page links |
labelViewDate |
'Date: ' |
What to display as a label for the date field when viewing the entries |
labelViewName |
'Name: ' |
Text to display as a label for the name field when viewing the entries |
labelViewHP |
'Homepage: ' |
Text to display as a label for the homepage field when viewing the entries |
labelPassPass |
"Owners Password: " |
Label to display when asking for the owner's password to view private entries |
labelPassSubmit |
'Yea, that\'s it!' |
Label of the submission button on the password page |
labelYes |
'Yes' |
'Yes' in your language |
labelNo |
'No' |
'No' in your language |
labelLanguage |
'Please choose your language:' |
Label of the drop down box for changing the interface language |
insufficientEntry |
'Please supply a name and a comment as a minimum!' |
Text to display when user did not enter a name and a comment |
entryTooLong |
'Sorry, that's too much text at a time! Why don't you restrict yourself to the substantial?' |
Rejection message for entries longer than the configured maximum length |
noEntries |
'No entries available.' |
What to display when the database is empty |
submitGreeting |
'These data was submitted into the guestbook: ' |
Text to display as a header for submitted data |
submitBack |
'Back' |
Link text back to view page |
notifyPrivateEntry |
'This is a private entry only viewable for the owner of the guestbook. |
What to display for non-owners (or unset password) when viewing a private entry |
privateLink |
'Owners klick here to view private entries.' |
What to display as a link text for private entries |
privateInfo |
'<font color="red">Private entry!</font>' |
Info string to display for owners when viewing private entries |
adminNoPass |
'Administration impossible without password!' |
Displayed, when the "edit entries" link was selected, but no password set so far |
adminNoPassLink |
'Enter password' |
Link text for entering owner's password in admin mode |
adminLink |
'Edit guestbook' |
Top-of-screen link text for editing entries |
adminLogout |
'Admin Logout' |
When logged in as the admin, this is the link text for the "log out" link |
adminEdit |
'Edit selected entry' |
text for radio button 1 in admin mode below the entry table |
adminRemove |
'Remove selected entry from guestbook' |
text for radio button 2 in admin mode below the entry table |
adminSubmit |
'Make it so!' |
Button text to edit/remove selected entry |
labelSuccessfullRemove |
'Entry successfully removed.' |
Darn. You are not that dumb. |
changeGreeting |
'<font color="red" size="+1">Edit</font>' |
Display this text instead of $insertGreeting when in admin/edit mode on insert form |
noEditSelection |
'No entry to edit - please select one.' |
Text to display when the "edit this one" button was pressed without a prior selection of an entry |
wrongPass |
'Hey! Wrong password!' |
Reason to die for when a wrong password is entered |
labelHTML |
'With HTML' |
Label: In Admin-Mode you are asked to supply your password and whether to display or to escape HTML sequences. This is for the 'display' option |
labelNoHTML |
'No HTML' |
Label: In Admin-Mode you are asked to supply your password and whether to display or to escape HTML sequences. This is for the 'escape' option |
labelSecurityGfx |
'Re-type the following security code:' |
The "anti spam image" label |
labelSecurityFailure |
'Wrong security code. Please retry.' |
Text to display when a wrong code was entered |
labelInvalidSession |
'Spam post?! If it was a valid post, please tell me so via email.' |
If session integrity is violated, the entry is regarded as a spam post. This is the label to display in this case. |