ICanBoogie/CLDR v1.5.0
  • Namespace
  • Class

Namespaces

  • ICanBoogie
    • CLDR

Classes

  • Calendar
  • CalendarCollection
  • Currency
  • CurrencyCollection
  • CurrencyFormatter
  • DateFormatter
  • DateTimeFormatter
  • FileProvider
  • ListFormatter
  • Locale
  • LocaleCollection
  • LocalizedCurrency
  • LocalizedDateTime
  • LocalizedListFormatter
  • LocalizedLocale
  • LocalizedNumberFormatter
  • LocalizedObject
  • LocalizedObjectWithFormatter
  • LocalizedTerritory
  • NumberFormatter
  • NumberPattern
  • NumberPatternParser
  • Numbers
  • ProviderCollection
  • RedisProvider
  • Repository
  • RunTimeProvider
  • Supplemental
  • Territory
  • TerritoryCollection
  • TimeFormatter
  • WebProvider

Interfaces

  • Exception
  • Formatter
  • LocalizeAwareInterface
  • Provider

Traits

  • CodePropertyTrait
  • CollectionTrait
  • LocalePropertyTrait
  • ProviderStorageBinding
  • RepositoryPropertyTrait

Exceptions

  • ResourceNotFound
  • TerritoryNotDefined

Class Locale

Representation of a locale.

ICanBoogie\CLDR\Locale implements ArrayAccess uses ICanBoogie\Accessor\AccessorTrait (not available) ICanBoogie\CLDR\RepositoryPropertyTrait, ICanBoogie\CLDR\CodePropertyTrait
Namespace: ICanBoogie\CLDR
Located at Locale.php

Methods summary

public
# __construct( ICanBoogie\CLDR\Repository $repository, string $code )

Initializes the $repository and $code properties.

Initializes the $repository and $code properties.

Parameters

$repository
$code
The ISO code of the locale.
protected string
# get_language( )

Returns

string
protected ICanBoogie\CLDR\CalendarCollection
# lazy_get_calendars( )

Returns

ICanBoogie\CLDR\CalendarCollection
protected ICanBoogie\CLDR\Calendar
# lazy_get_calendar( )

Returns

ICanBoogie\CLDR\Calendar
protected ICanBoogie\CLDR\Numbers
# lazy_get_numbers( )

Returns

ICanBoogie\CLDR\Numbers
protected ICanBoogie\CLDR\LocalizedNumberFormatter
# lazy_get_number_formatter( )

Returns

ICanBoogie\CLDR\LocalizedNumberFormatter
protected ICanBoogie\CLDR\LocalizedListFormatter
# lazy_get_list_formatter( )

Returns

ICanBoogie\CLDR\LocalizedListFormatter
public
# offsetExists( $offset )

Inheritdoc

Implementation of

ArrayAccess::offsetExists()
public
# offsetGet( $offset )

Inheritdoc

Implementation of

ArrayAccess::offsetGet()
public
# offsetSet( $offset, $value )

Throws

ICanBoogie\OffsetNotWritable

Inheritdoc

Implementation of

ArrayAccess::offsetSet()
public
# offsetUnset( $offset )

Throws

ICanBoogie\OffsetNotWritable

Inheritdoc

Implementation of

ArrayAccess::offsetUnset()
public mixed
# localize( object|string $source_or_code, array $options = [] )

Localize the specified source.

Localize the specified source.

Parameters

$source_or_code

The source to localize, or the locale code to localize this instance.

$options
The options are passed to the localizer.

Returns

mixed
public string
# format_number( number $number, string|null $pattern = null, array $symbols = [] )

Formats a number using $number_formatter.

Formats a number using $number_formatter.

Parameters

$number
$pattern
$symbols

Returns

string

See

LocalizedNumberFormatter::format
public string
# format_list( array $list, array|string $list_patterns_or_type = LocalizedListFormatter::TYPE_STANDARD )

Formats a variable-length lists of things using $list_formatter.

Formats a variable-length lists of things using $list_formatter.

Parameters

$list
The list to format.
$list_patterns_or_type

A list patterns or a list patterns type (one of LocalizedListFormatter::TYPE_*).

Returns

string

Methods used from ICanBoogie\CLDR\RepositoryPropertyTrait

get_repository()

Methods used from ICanBoogie\CLDR\CodePropertyTrait

__toString(), get_code()

Properties summary

protected array $sections

Loaded sections.

Loaded sections.

# []

Magic properties

public read-only ICanBoogie\CLDR\Repository $repository

The repository provided during construct.

public read-only string $code

The ISO code of the locale.

public read-only string $language

The language code.

public read-only ICanBoogie\CLDR\CalendarCollection $calendars

The calendar collection of the locale.

public read-only ICanBoogie\CLDR\Calendar $calendar

The preferred calendar for this locale.

public read-only ICanBoogie\CLDR\Numbers $numbers
public read-only ICanBoogie\CLDR\LocalizedNumberFormatter $number_formatter
public read-only ICanBoogie\CLDR\LocalizedListFormatter $list_formatter
ICanBoogie/CLDR v1.5.0 API documentation generated by ApiGen