$WBGV - get INI variable

Availability
$WBGV  is available for use with all WBSP commands:

Syntax
$WBGV{filename|sectionname|varname|default|render}
$WBGV[filename|sectionname|varname|default|render]

Parameters
filename - full path and file name of the configuration file
sectionname - the name of the section that contains required parameter
varname - the name of the required parameter
default - optional default value that will be returned if required parameter does not have a value
render - optional boolean parameter (T/F) that defines whether the value will be processed by WhizBase or returned as plain text

Returns
Value of required parameter.

Example

File wbgv.wbsp

<!--
[FormFields]
wb_command=r
-->
<!--WB_BeginTemplate-->
<html>
<head>
<title>WBGV example</title>
</head>
<body>
$wbsetv[lng|eng]
$wbgv[resource.cfg|Messages|Hello$wbgetv[lng]||T]
</body>
</html>

File resource.cfg

[Messages]
HelloEng=Hello visitor from IP $wbe{remote_host}
HelloGer=Hallo Besucher von IP $wbe{remote_host}
HelloEsp=Hola visitante de IP $wbe{remote_host}
HelloIta=Ciao ospite da IP $wbe{remote_host}
HelloFra=Bonjour visiteur de IP $wbe{remote_host}

 

After running this example, the resulting page in browser, may look like this:

Hello visitor from IP 127.0.0.1

Then simply change the line $wbsetv[lng|eng] to $wbsetv[lng|esp] and the resulting page will change to:

Hola visitante de IP 127.0.0.1

Try changing the value to ger, ita and fra and see the result.