Login Retreive lost passwordRegister
Search

Manual  /  Functions  /  Look & Feel  /  SetLanguage

SetLanguage
SetLanguage (
string $language = null 
)

Arguments:

Name Description
$language The language you want to set. When no language is given, the language is set defined by the users browser (auto detect).

Description:

Set the language used for displaying messages and other. By default, the language used by the visitors browser wil be set.

In the directory FH3/language you will find all the languages which are supported. To set a language, just give the name of the file without the ".php" extension (so "it.php" bekomes "it").

Example

<?php

// include the class
include('FH3/class.FormHandler.php');

// make a new $form object
$form = new FormHandler();

// set the language to dutch
$form -> setLanguage'nl' );

// a textfield  + submit button
$form -> textField    ("Your name""name"FH_STRING);
$form -> submitButton ("Save");

// set the 'commit after form' function
$form -> onCorrect("doRun");

// send the form to the screen
$form -> flush();

// function to show a message
function doRun($data
{  
    return 
"Hello "$data["name"];
}
?>

Preview image

preview image

See also: GetLanguage

Latest change: 05 March 10 / 08:48

Comments

powered by PHP-GLOBE   © 2004 - 2024 FormHandler. All rights reserved.   -   Open source license