本文整理汇总了PHP中Dog::getLangISO方法的典型用法代码示例。如果您正苦于以下问题:PHP Dog::getLangISO方法的具体用法?PHP Dog::getLangISO怎么用?PHP Dog::getLangISO使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dog
的用法示例。
在下文中一共展示了Dog::getLangISO方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: lang
public static function lang($key, $args = NULL)
{
return self::langISO(Dog::getLangISO(), $key, $args);
}
示例2: lang
public function lang($key, $args = NULL)
{
return $this->langISO(Dog::getLangISO(), $key, $args);
}
示例3: array
$DOG_PLUG_ALERT_TIMERS = array();
}
$plug = Dog::getPlugin();
if ($plug->argc() < 2) {
return $plug->showHelp();
}
$seconds = str_replace('m', 'i', $plug->argv(0));
// Try to parse seconds from input
if (0 >= ($seconds = GWF_TimeConvert::humanToSeconds($seconds))) {
return $plug->rply('err_seconds');
}
if (GWF_Time::ONE_DAY * 8 < $seconds) {
return $plug->rply('err_too_long');
}
// Try to parse back duration from parsed seconds
if (false === ($delay = GWF_TimeConvert::humanDurationISO(Dog::getLangISO(), $seconds))) {
return $plug->rply('err_seconds');
}
$user = Dog::getUser();
if (!isset($DOG_PLUG_ALERT_TIMERS[$user->getID()])) {
$DOG_PLUG_ALERT_TIMERS[$user->getID()] = 0;
}
if ($DOG_PLUG_ALERT_TIMERS[$user->getID()] >= 3) {
return $plug->rply('err_too_much');
}
if (!function_exists('dog_plugin_alert_func4')) {
function dog_plugin_alert_func4(array $args)
{
global $DOG_PLUG_ALERT_TIMERS;
$scope = $args[0];
$scope instanceof Dog_Scope;
示例4: getTrans
public function getTrans()
{
return $this->lang_->getTrans(Dog::getLangISO());
}
示例5: displayAge
public function displayAge()
{
return GWF_Time::displayAgeISO($this->getDate(), Dog::getLangISO());
}
示例6: array
<?php
$lang = array('en' => array('help' => 'Usage: %CMD% [<timestamp>] [<timezone>]. Convert a unix timestamp to a date.', 'conv' => 'Timestamp %s will be %s.'));
$plugin = Dog::getPlugin();
if ('' === ($message = $plugin->msg())) {
return $plugin->showHelp();
}
$args = explode(' ', $message);
if (count($args) === 1) {
$args[] = 'CET';
}
if (count($args) !== 2) {
return $plugin->showHelp();
}
$plugin->rply('conv', array($args[0], GWF_Time::displayTimestamp($args[0], Dog::getLangISO(), 'Invalid date')));
示例7: array
<?php
$lang = array('en' => array('help' => 'Usage: %CMD% <some location>. Get weather information from google.', 'err_google' => 'Cannot connect to google.', 'err_decode' => 'An error occured in the response processor.', 'weather' => "Wetter in %s: %s, %s°C, %s."));
$plugin = Dog::getPlugin();
$msg = $plugin->msg();
if ($msg === '') {
return $plugin->showHelp();
}
return $plugin->rply('NOT WORKING');
$url = "http://www.google.com/ig/api?weather=" . urlencode($msg) . "&hl=" . Dog::getLangISO();
if (false === ($file = GWF_HTTP::getFromURL($url))) {
return $plugin->rply('err_google');
}
try {
$file = utf8_encode($file);
if (false !== ($xml = simplexml_load_string($file))) {
$temp = $xml->weather->forecast_information->city;
$location = $xml->weather->forecast_information->city->attributes()->data;
$condition = $xml->weather->current_conditions->condition->attributes()->data;
$temp_c = $xml->weather->current_conditions->temp_c->attributes()->data;
$humidity = $xml->weather->current_conditions->humidity->attributes()->data;
$plugin->rply('weather', array($location, $condition, $temp_c, $humidity));
}
} catch (Exception $e) {
}
$plugin->rply('err_decode');