void autoDetectLanguage(
)
|
|
Performs an auto detection of the language used by the user browser and set the Language property accordingly.
This method performs a detection operation trying to guess which language is used by the user depending on the browser headers and information is sent.
Can be used to accomodate automatically your application to the right language the user want to get without prompting for it.
Valid languages can be found on language/php_language_detection.php on the function called languages() and you can get such list as an array calling that function in your software
<?php
function Button1Click($sender, $params)
{
global $application;
echo $application->Language;
//This echoes in the browser "Spanish (Traditional Sort)"
}
?>
Tags:
Sets the application language, so all forms in the application will share this setting.
If you want to change the Language property for all your forms at once, you can use this property, as forms take this setting into account when switching language.
This property is of string type and you can set it to anything you want, provided your language files share the same value and your locale resources also share that setting.
<?php
global $application;
$application->Language="English";
//Now, your forms must have a unit.English.xml.php resource file with your translated strings
//and also a locale/English/messages.mo to be used for runtime strings
?>
Tags: