当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Locale::getCountryTranslationList方法代码示例

本文整理汇总了PHP中Zend_Locale::getCountryTranslationList方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Locale::getCountryTranslationList方法的具体用法?PHP Zend_Locale::getCountryTranslationList怎么用?PHP Zend_Locale::getCountryTranslationList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend_Locale的用法示例。


在下文中一共展示了Zend_Locale::getCountryTranslationList方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testgetCountryTranslationList

 /**
  * test getCountryTranslationList
  * expected true
  */
 public function testgetCountryTranslationList()
 {
     $value = new Zend_Locale();
     $list = $value->getCountryTranslationList();
     $this->assertTrue(is_array($list));
     $list = $value->getCountryTranslationList('de');
     $this->assertEquals("Vereinigte Staaten", $list['US']);
 }
开发者ID:jon9872,项目名称:zend-framework,代码行数:12,代码来源:LocaleTest.php

示例2: dirname

<?php 
require_once dirname(__FILE__) . '/../../common.php';
// -----------------------------------------------------------------------------
// Get geographical information, based on current IP
try {
    $client = new Zend_Http_Client();
    $client->setUri('http://ipLocationTools.com/ip_query.php?output=json');
    $response = $client->request();
    if (200 === $response->getStatus()) {
        $geoIp = Zend_Json::decode($response->getBody());
        if (isset($geoIp['City']) && strlen($geoIp['City']) > 0) {
            $city = $geoIp['City'];
        }
        if (isset($geoIp['CountryCode']) && strlen($geoIp['CountryCode']) > 0) {
            $countryCode = $geoIp['CountryCode'];
            $countries = Zend_Locale::getCountryTranslationList(LOCALE);
            if (isset($countries[$countryCode])) {
                $country = $countries[$countryCode];
            }
        }
    }
} catch (Zend_Http_Client_Exception $e) {
}
// -----------------------------------------------------------------------------
// Generate document
$date = new Zend_Date();
$date->setLocale(LOCALE);
$phpLiveDocx = new Tis_Service_LiveDocx_MailMerge(USERNAME, PASSWORD);
$phpLiveDocx->setLocalTemplate('template.docx');
$phpLiveDocx->assign('software', 'Magic Graphical Compression Suite v1.9');
$phpLiveDocx->assign('licensee', 'Henry Döner-Meyer');
开发者ID:kaseya-university,项目名称:efront,代码行数:31,代码来源:generate-document.php

示例3: testgetCountryTranslationList

 /**
  * test getCountryTranslationList
  * expected true
  */
 public function testgetCountryTranslationList()
 {
     $value = new Zend_Locale();
     $list = $value->getCountryTranslationList();
     $this->assertTrue(is_array($list), 'Region List not returned');
     $list = $value->getCountryTranslationList('de');
     $this->assertTrue(is_array($list), 'Region List not returned');
 }
开发者ID:jorgenils,项目名称:zend-framework,代码行数:12,代码来源:LocaleTest.php

示例4: getCountryOptionList

 /**
  * Get the countries list generated using Zend_Locale
  * 
  * @return array $key=>$value 
  */
 public function getCountryOptionList()
 {
     return Zend_Locale::getCountryTranslationList();
 }
开发者ID:hettema,项目名称:Stages,代码行数:9,代码来源:Edit.php


注:本文中的Zend_Locale::getCountryTranslationList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。