本文整理汇总了PHP中GetDefaultLocale函数的典型用法代码示例。如果您正苦于以下问题:PHP GetDefaultLocale函数的具体用法?PHP GetDefaultLocale怎么用?PHP GetDefaultLocale使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetDefaultLocale函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
function __construct($args)
{
$this->args = $args;
$this->site = new MgSiteConnection();
$this->site->Open(new MgUserInformation($args['SESSION']));
SetLocalizedFilesPath(GetLocalizationPath());
if(isset($_REQUEST['LOCALE'])) {
$locale = $_REQUEST['LOCALE'];
} else {
$locale = GetDefaultLocale();
}
$equalToLocal = GetLocalizedString('QUERYEQUALTO', $locale );
$notEqualToLocal = GetLocalizedString('QUERYNOTEQUALTO', $locale );
$greatThanLocal = GetLocalizedString('QUERYGREATTHAN', $locale );
$greatThanEqualLocal = GetLocalizedString('QUERYGREATTHANEQUAL', $locale );
$lessThanLocal = GetLocalizedString('QUERYLESSTHAN', $locale );
$lessThanEqualLocal = GetLocalizedString('QUERYLESSTHANEQUAL', $locale );
$beginLocal = GetLocalizedString('QUERYBEGIN', $locale );
$containsLocal = GetLocalizedString('QUERYCONTAINS', $locale );
$this->numOperators = array($equalToLocal, $notEqualToLocal, $greatThanLocal, $greatThanEqualLocal, $lessThanLocal, $lessThanEqualLocal);
$this->numExpressions = array(' = %s', ' != %s', ' > %s', ' >= %s', ' < %s', ' <= %s');
$this->strOperators = array($beginLocal, $containsLocal, $equalToLocal);
$this->strExpressions = array(" like '%s%%'", " like '%%%s%%'", " = '%s'");
}
示例2: GetDefaultLocale
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of version 2.1 of the GNU Lesser
// General Public License as published by the Free Software Foundation.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
include 'common.php';
include 'constants.php';
$locale = GetDefaultLocale();
$scaleDenominator;
$annotations;
$args = GetRequestMethod();
GetParameters($args);
$templ = file_get_contents("../viewerfiles/quickplotpreviewinner.templ");
SetLocalizedFilesPath(GetLocalizationPath());
// Localize the page
$templ = Localize($templ, $locale, GetClientOS());
// Set some annotation labels in the page by replacing the placeholders in the html code
$templ = str_replace(array_keys($annotations), array_values($annotations), $templ);
// Set the date annotation according to its format mask
$pattern = "/\\{date:.*\\[php=(.+?)\\].+?\\}/";
$matches = array();
if (preg_match($pattern, $templ, $matches)) {
$mask = $matches[1];
示例3: ValidateLocaleString
function ValidateLocaleString($proposedLocaleString)
{
// aa or aa-aa
$validLocaleString = GetDefaultLocale();
// Default
if ($proposedLocaleString != null && (preg_match('/^[A-Za-z]{2}$/', $proposedLocaleString) || preg_match('/^[A-Za-z]{2}-[A-Za-z]{2}$/', $proposedLocaleString))) {
$validLocaleString = $proposedLocaleString;
}
return $validLocaleString;
}
示例4: InitializeWebTier
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-->
<head>
<title>PHP Test</title>
</head>
<body>
<?php
include 'common.php';
echo "<b>Server Admin Service Tests</b><p>";
// Initialize web tier with the site configuration file.
InitializeWebTier();
$cred = new MgUserInformation();
$cred->SetMgUsernamePassword("Administrator", "admin");
$cred->SetLocale(GetDefaultLocale());
$cred->SetClientIp(GetClientIp());
$cred->SetClientAgent(GetClientAgent());
$serverAdmin = new MgServerAdmin();
$serverAdmin->Open("localhost", $cred);
$operation = $_GET['OPERATION'];
//Get all information properties
$infoProp = $serverAdmin->GetInformationProperties();
try {
switch ($operation) {
case "ONLINE":
$serverAdmin->BringOnline();
if ($serverAdmin->IsOnline()) {
echo "Server online<p>";
} else {
echo "Server offline<p>";