本文整理匯總了PHP中sfCultureInfo::getEnglishName方法的典型用法代碼示例。如果您正苦於以下問題:PHP sfCultureInfo::getEnglishName方法的具體用法?PHP sfCultureInfo::getEnglishName怎麽用?PHP sfCultureInfo::getEnglishName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類sfCultureInfo
的用法示例。
在下文中一共展示了sfCultureInfo::getEnglishName方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: sfCultureInfo
$t->isa_ok($c->getParent(), 'sfCultureInfo', '->getParent() returns a sfCultureInfo instance');
$t->is($c->getParent()->getName(), 'fr', '->getParent() returns the parent culture');
$c = new sfCultureInfo('fr');
$t->is($c->getParent()->getName(), 'en', '->getParent() returns the invariant culture if the culture is neutral');
// ->getIsNeutralCulture()
$t->diag('->getIsNeutralCulture()');
$c = new sfCultureInfo('fr_FR');
$t->is($c->getIsNeutralCulture(), false, '->getIsNeutralCulture() returns false if the culture is specific');
$c = new sfCultureInfo('fr');
$t->is($c->getIsNeutralCulture(), true, '->getIsNeutralCulture() returns true if the culture is neutral');
// ->getEnglishName()
$t->diag('->getEnglishName()');
$c = new sfCultureInfo('fr_FR');
$t->is($c->getEnglishName(), 'French (France)', '->getEnglishName() returns the english name of the current culture');
$c = new sfCultureInfo('fr');
$t->is($c->getEnglishName(), 'French', '->getEnglishName() returns the english name of the current culture');
$t->is($c->getEnglishName(), $c->EnglishName, '->getEnglishName() is equivalent to ->EnglishName');
// ->getNativeName()
$t->diag('->getNativeName()');
$c = new sfCultureInfo('fr_FR');
$t->is($c->getNativeName(), 'français (France)', '->getNativeName() returns the native name of the current culture');
$c = new sfCultureInfo('fr');
$t->is($c->getNativeName(), 'français', '->getNativeName() returns the native name of the current culture');
$t->is($c->getNativeName(), $c->NativeName, '->getNativeName() is equivalent to ->NativeName');
// ->getCalendar()
$t->diag('->getCalendar()');
$c = new sfCultureInfo('fr');
$t->is($c->getCalendar(), 'gregorian', '->getCalendar() returns the default calendar');
$t->is($c->getCalendar(), $c->Calendar, '->getCalendar() is equivalent to ->Calendar');
// __get()
$t->diag('__get()');