Overview

Packages

  • Nls

Classes

  • Horde_Nls
  • Horde_Nls_Geoip
  • Horde_Nls_Translation
  • Overview
  • Package
  • Class
  • Tree

Class Horde_Nls

The Horde_Nls:: class provides Native Language Support. This includes common methods for handling language data, timezones, and hostname->country lookups.

Copyright 1999-2012 Horde LLC (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Package: Nls
Category: Horde
License: LGPL 2.1
Author: Jon Parise jon@horde.org
Author: Chuck Hagenbuch chuck@horde.org
Author: Jan Schneider jan@horde.org
Author: Michael Slusarz slusarz@horde.org
Located at Horde/Nls.php
Methods summary
public static boolean
# checkCharset( string $charset )

Check to see if character set is valid for htmlspecialchars() calls.

Check to see if character set is valid for htmlspecialchars() calls.

Parameters

$charset
The character set to check.

Returns

boolean
Is charset valid for the current system?
public static array
# getTimezones( )

Returns a list of available timezones.

Returns a list of available timezones.

Returns

array
List of timezones.
public static array
# getLocaleInfo( )

Get the locale info returned by localeconv(), but cache it, to avoid repeated calls.

Get the locale info returned by localeconv(), but cache it, to avoid repeated calls.

Returns

array
The results of localeconv().
public static array
# getLangInfo( const $item )

Get the language info returned by nl_langinfo(), but cache it, to avoid repeated calls.

Get the language info returned by nl_langinfo(), but cache it, to avoid repeated calls.

Parameters

$item
The langinfo item to return.

Returns

array
The results of nl_langinfo().
public static mixed
# getCountryByHost( string $host, string $datafile = null )

Get country information from a hostname or IP address.

Get country information from a hostname or IP address.

Parameters

$host
The hostname or IP address.
$datafile
<p>The datafile for the GeoIP lookup. If not set, will skip this lookup.</p>

Returns

mixed

On success, return an array with the following entries: 'code' => Country Code 'name' => Country Name On failure, return false.

public static mixed
# tldLookup( string $code )

Do a top level domain (TLD) lookup.

Do a top level domain (TLD) lookup.

Parameters

$code
A 2-letter country code.

Returns

mixed
The localized country name, or null if not found.
public static mixed
# getCountryISO( string $code = null )

Returns either a specific or all ISO-3166 country names.

Returns either a specific or all ISO-3166 country names.

Parameters

$code
The ISO 3166 country code.

Returns

mixed

If a country code has been requested will return the corresponding country name. If empty will return an array of all the country codes and their names.

public static mixed
# getLanguageISO( string $code = null )

Returns either a specific or all ISO-639 language names.

Returns either a specific or all ISO-639 language names.

Parameters

$code
The ISO 639 language code.

Returns

mixed

If a language code has been requested will return the corresponding language name. If empty will return an array of all the language codes (keys) and their names (values).

Properties summary
public static Net_DNS2_Resolver $dnsResolver

DNS resolver.

DNS resolver.

#
API documentation generated by ApiGen