本文整理汇总了PHP中SR_Player::getLangISO方法的典型用法代码示例。如果您正苦于以下问题:PHP SR_Player::getLangISO方法的具体用法?PHP SR_Player::getLangISO怎么用?PHP SR_Player::getLangISO使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SR_Player
的用法示例。
在下文中一共展示了SR_Player::getLangISO方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: hasChatTree
private static function hasChatTree(SR_RealNPC $npc, SR_Player $player, $word, array $tree)
{
echo "hasChatTree\n";
var_dump($tree);
$lang = $npc->getLangNPC()->getTrans($player->getLangISO());
$newtree = array();
foreach ($tree as $word) {
if (!isset($lang[$word])) {
$player->setChatTree($npc, array($word));
return false;
} else {
$lang = $lang[$word];
}
}
if (is_array($lang) && isset($lang[$word])) {
$player->pushChatTree($npc, $word);
return $lang[$word];
}
return $lang;
}
示例2: langPlayer
public static function langPlayer(SR_Player $player, $key, $args = NULL)
{
$iso = $player->getLangISO();
$x = is_numeric($key) && $iso === 'bot' ? 'X' : '';
return DOGMOD_Shadowlamb::instance()->langISO($iso, $key, $args) . $x;
}
示例3: lang
public function lang(SR_Player $player, $key, $args = NULL)
{
return $this->lang->langISO($player->getLangISO(), $key, $args);
}
示例4: displayItemdescr
public static function displayItemdescr(SR_Player $player, SR_Item $item)
{
return self::$LANG_ITEM->langISO($player->getLangISO(), $item->getName() . '__desc__');
}
示例5: translateVar
/**
* Turn a var into translated shortcut.
* @param SR_Player $player
* @param string $var
* @return string
*/
public static function translateVar(SR_Player $player, $var)
{
return self::shortcut($var, Shadowlang::getVarFile()->getTrans($player->getLangISO()));
}
示例6: displayDescription
public function displayDescription(SR_Player $player)
{
if ($player->getLangISO() === 'bot') {
return '';
}
return Shadowlang::displayItemdescr($player, $this);
}