getCode() 공개 메소드

Get the two-letter code for this language.
public getCode ( ) : string
리턴 string
예제 #1
0
 /**
  * Returns an array with data indexed by name.
  *
  * @return array
  */
 public function toArray()
 {
     $adminLevels = [];
     foreach ($this->adminLevels as $adminLevel) {
         $adminLevels[$adminLevel->getLevel()] = ['name' => $adminLevel->getName(), 'code' => $adminLevel->getCode()];
     }
     return array('latitude' => $this->getLatitude(), 'longitude' => $this->getLongitude(), 'bounds' => $this->bounds->toArray(), 'kind' => $this->kind, 'streetNumber' => $this->streetNumber, 'streetName' => $this->streetName, 'postalCode' => $this->postalCode, 'locality' => $this->locality, 'subLocality' => $this->subLocality, 'adminLevels' => $adminLevels, 'country' => $this->country->getName(), 'countryCode' => $this->country->getCode(), 'timezone' => $this->timezone);
 }
예제 #2
0
 /**
  * Get a prefix for a given country.
  * @param Country $country
  * @return PhonePrefix
  * @throws Unknown if the given country has no dedicated phone prefix.
  */
 static function getByCountry(Country $country)
 {
     $code = $country->getCode();
     $prefix = false;
     foreach (self::$prefixes as $candidate => $countries) {
         if (in_array($code, $countries)) {
             $prefix = $candidate;
             break;
         }
     }
     if ($prefix) {
         return new PhonePrefix($prefix);
     } else {
         throw new Unknown();
     }
 }
예제 #3
0
 /**
  * Locale of pages displayed by PayPal during Express Checkout.
  * Character length and limitations: Any two-character country code.
  * The following two-character country codes are supported by PayPal:
  * * AU - Australia
  * * AT - Austria
  * * BE - Belgium
  * * CA - Canada
  * * CH - Switzerland
  * * CN - China
  * * DE - Germany
  * * ES - Spain
  * * GB - United Kingdom
  * * FR - France
  * * IT - Italy
  * * NL - Netherlands
  * * PL - Poland
  * * US - United States
  * Any other value will default to US.
  *
  * @param Country $country
  */
 public function setLocale(Country $country)
 {
     $this->collection->setValue('LOCALECODE', $country->getCode());
 }
예제 #4
0
	<TD ALIGN="RIGHT" valign="top"><?php  putGS("Country"); ?>:</TD>
	<TD>
	<?php
	$names = array();
	foreach ($countryTranslations as $translation) {
		$names[] = htmlspecialchars($translation->getName());
	}
	echo implode(", ", $names);
	?>
	<TR>
		<TD ALIGN="RIGHT" ><?php  putGS("Name"); ?>:</TD>
		<TD>
		<INPUT TYPE="TEXT" class="input_text" NAME="f_country_name" SIZE="32" VALUE="<?php  p(htmlspecialchars($country->getName())); ?>">
		</TD>
	</TR>
	<TR>
		<TD COLSPAN="2">
		<DIV ALIGN="CENTER">
		<INPUT TYPE="HIDDEN" NAME="f_country_code" VALUE="<?php  print $country->getCode(); ?>">
		<INPUT TYPE="HIDDEN" NAME="f_country_language" VALUE="<?php  print $country->getLanguageId(); ?>">
		<INPUT TYPE="submit" class="button" NAME="OK" VALUE="<?php  putGS('Save'); ?>">
		<!--<INPUT TYPE="button" class="button" NAME="Cancel" VALUE="<?php  putGS('Cancel'); ?>" ONCLICK="location.href='/admin/country/'">-->
		</DIV>
		</TD>
	</TR>
</TABLE>
</FORM>
<P>

<?php camp_html_copyright_notice(); ?>
예제 #5
0
파일: deftime.php 프로젝트: nidzix/Newscoop
    p($ADMIN);
    ?>
/pub/editdeftime.php?Pub=<?php 
    p($Pub);
    ?>
&CountryCode=<?php 
    p($time->getCountryCode());
    ?>
&Language=<?php 
    p($Language);
    ?>
"><?php 
    p(htmlspecialchars($country->getName()));
    ?>
 (<?php 
    p(htmlspecialchars($country->getCode()));
    ?>
)</A>
		</TD>
		<TD ALIGN="center">
			<?php 
    p(htmlspecialchars($time->getTrialTime()));
    ?>
		</TD>
		<TD ALIGN="center">
			<?php 
    p(htmlspecialchars($time->getPaidTime()));
    ?>
		</TD>
		<TD ALIGN="CENTER">
			<A HREF="/<?php 
예제 #6
0
	<TD ALIGN="LEFT" VALIGN="TOP" rowspan="2"><B><?php  putGS("Country<BR><SMALL>(click to edit)</SMALL>"); ?></B></TD>
	<td colspan="2"><?php putGS('Default time period'); ?> (<?php p($pubTimeUnit->getName()); ?>):</td>
	<TD ALIGN="LEFT" VALIGN="TOP" rowspan="2"><B><?php  putGS("Delete"); ?></B></TD>
</TR>
<tr class="table_list_header">
	<TD ALIGN="LEFT" VALIGN="TOP" nowrap><B><?php  putGS("trial subscription"); ?></B></TD>
	<TD ALIGN="LEFT" VALIGN="TOP" nowrap><B><?php  putGS("paid subscription"); ?></B></TD>
</tr>
<?php
$color = 0;
foreach ($defaultTimes as $time) {
	$country = new Country($time->getCountryCode(), $Language);
	?>
	<TR <?php  if ($color) { $color=0; ?>class="list_row_even"<?php  } else { $color=1; ?>class="list_row_odd"<?php  } ?>>
		<TD>
    	<A HREF="/<?php p($ADMIN); ?>/pub/editdeftime.php?Pub=<?php p($Pub); ?>&CountryCode=<?php  p($time->getCountryCode()); ?>&Language=<?php p($Language); ?>"><?php p(htmlspecialchars($country->getName())); ?> (<?php p(htmlspecialchars($country->getCode())); ?>)</A>
		</TD>
		<TD ALIGN="center">
			<?php p(htmlspecialchars($time->getTrialTime())); ?>
		</TD>
		<TD ALIGN="center">
			<?php p(htmlspecialchars($time->getPaidTime())); ?>
		</TD>
		<TD ALIGN="CENTER">
			<A HREF="/<?php p($ADMIN); ?>/pub/do_deldeftime.php?Pub=<?php p($Pub); ?>&CountryCode=<?php  p($time->getCountryCode()); ?>&Language=<?php p($Language); ?>&<?php echo SecurityToken::URLParameter(); ?>" onclick="return confirm('<?php putGS('Are you sure you want to delete the subscription settings for $1?', "&quot;".htmlspecialchars($publicationObj->getName()).':'.htmlspecialchars($time->getCountryCode())."&quot;"); ?>');"><IMG SRC="<?php echo $Campsite["ADMIN_IMAGE_BASE_URL"]; ?>/delete.png" BORDER="0" ALT="<?php  putGS('Delete'); ?>" TITLE="<?php  putGS('Delete'); ?>" ></A>
		</TD>
	</TR>
<?php
}
?>	<TR><TD COLSPAN="2" NOWRAP>
</TABLE>
예제 #7
0
 function erase(Country $country)
 {
     $parametros = array();
     $parametros['Code'] = $country->getCode();
     return $this->bd->delete($this->tabla, $parametros);
 }
예제 #8
0
파일: edit.php 프로젝트: nidzix/Newscoop
		<TD ALIGN="RIGHT" ><?php 
putGS("Name");
?>
:</TD>
		<TD>
		<INPUT TYPE="TEXT" class="input_text" NAME="f_country_name" SIZE="32" VALUE="<?php 
p(htmlspecialchars($country->getName()));
?>
">
		</TD>
	</TR>
	<TR>
		<TD COLSPAN="2">
		<DIV ALIGN="CENTER">
		<INPUT TYPE="HIDDEN" NAME="f_country_code" VALUE="<?php 
print $country->getCode();
?>
">
		<INPUT TYPE="HIDDEN" NAME="f_country_language" VALUE="<?php 
print $country->getLanguageId();
?>
">
		<INPUT TYPE="submit" class="button" NAME="OK" VALUE="<?php 
putGS('Save');
?>
">
		<!--<INPUT TYPE="button" class="button" NAME="Cancel" VALUE="<?php 
putGS('Cancel');
?>
" ONCLICK="location.href='/admin/country/'">-->
		</DIV>
예제 #9
0
include_once($GLOBALS['g_campsiteDir']."/$ADMIN_DIR/javascript_common.php");

$crumbs = array(getGS("Subscriptions") => "deftime.php?Pub=$Pub&Language=$Language");
camp_html_content_top(getGS("Change country subscription settings"), array("Pub" => $publicationObj), true, false, $crumbs);

?>
<P>
<FORM NAME="subscription_settings" METHOD="POST" ACTION="do_editdeftime.php" onsubmit="return <?php camp_html_fvalidate(); ?>;">
<?php echo SecurityToken::FormParameter(); ?>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" CLASS="box_table">
<INPUT TYPE="HIDDEN" NAME="Pub" VALUE="<?php p($Pub); ?>">
<INPUT TYPE="HIDDEN" NAME="CountryCode" VALUE="<?php p($CountryCode); ?>">
<INPUT TYPE="HIDDEN" NAME="Language" VALUE="<?php p($Language); ?>">
<TR>
	<TD ALIGN="center" colspan="2">
		<b><?php  putGS("Country"); ?>: <?php p(htmlspecialchars($country->getName()." (".$country->getCode().")")); ?></b>
	</TD>
</TR>
<tr>
	<td colspan="2" align="left"><?php putGS('Default time periods:'); ?></td>
</tr>
<TR>
	<TD ALIGN="RIGHT" >- <?php  putGS("trial subscription"); ?>:</TD>
	<TD>
	<INPUT TYPE="TEXT" NAME="cTrialTime" VALUE="<?php p($defaultTime->getTrialTime()); ?>" SIZE="5" MAXLENGTH="5" class="input_text" alt="number|0|1|100000" emsg="<?php putGS("You must input a number greater than 0 into the $1 field.", "&quot;".getGS("trial subscription")."&quot;"); ?>">
	<?php p($pubTimeUnit->getName()); ?>
	</TD>
</TR>
<TR>
	<TD ALIGN="RIGHT" >- <?php  putGS("paid subscription"); ?>:</TD>
	<TD>
예제 #10
0
">
<INPUT TYPE="HIDDEN" NAME="CountryCode" VALUE="<?php 
p($CountryCode);
?>
">
<INPUT TYPE="HIDDEN" NAME="Language" VALUE="<?php 
p($Language);
?>
">
<TR>
	<TD ALIGN="center" colspan="2">
		<b><?php 
putGS("Country");
?>
: <?php 
p(htmlspecialchars($country->getName() . " (" . $country->getCode() . ")"));
?>
</b>
	</TD>
</TR>
<tr>
	<td colspan="2" align="left"><?php 
putGS('Default time periods:');
?>
</td>
</tr>
<TR>
	<TD ALIGN="RIGHT" >- <?php 
putGS("trial subscription");
?>
:</TD>