37 lines
1 KiB
Perl
37 lines
1 KiB
Perl
package WebGUI::i18n::English::If;
|
|
|
|
our $I18N = {
|
|
|
|
'if title' => {
|
|
message => q|If Macro|,
|
|
lastUpdated => 1112466408,
|
|
},
|
|
|
|
'if body' => {
|
|
message => q|
|
|
<b>^If();</b><br>
|
|
A simple conditional statement (IF/THEN/ELSE) to control layout and messages.
|
|
<p>
|
|
<i>Examples:</i><br>
|
|
Display Happy New Year on 1st January:
|
|
^If('^D("%m%d");' eq '0101' , Happy New Year);
|
|
<p>
|
|
Display a message to people on your subnet (192.168.1.*):<br>
|
|
^If('^Env("REMOTE_ADDR");' =~ /^192.168.1/,"Hi co-worker","Hi Stranger");
|
|
<p>
|
|
Display a message to Windows users:<br>
|
|
^If('^URLEncode("^Env("HTTP_USER_AGENT");");' =~ /windows/i,"Hey... Linux is free !");
|
|
<p>
|
|
Display a message if a user is behind a proxy:<br>
|
|
^If('^Env("HTTP_VIA");' ne "", You're behind a proxy !, Proxy-free is the best...);
|
|
<p>
|
|
Display Good Morning/Afternoon/Evening:<br>
|
|
^If(^D("%J");<=12,Good Morning,^If(^D("%J");<=18,Good Afternoon,Good evening););
|
|
<p>
|
|
|
|
|,
|
|
lastUpdated => 1112466919,
|
|
},
|
|
};
|
|
|
|
1;
|