Class Locale
Representation of a locale.
-
ICanBoogie\CLDR\AbstractSectionCollection
implements
ArrayAccess
uses
ICanBoogie\Accessor\AccessorTrait (not available)
ICanBoogie\CLDR\CollectionTrait,
ICanBoogie\CLDR\RepositoryPropertyTrait
-
┗
ICanBoogie\CLDR\Locale
uses
ICanBoogie\CLDR\CodePropertyTrait
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.
Overrides
protected
get_language( void )
: string
public
localize( object|string $source_or_code
, array $options
= [] )
: mixed
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
context_transform( string $str
, string $usage
, string $type
)
: string
Transforms a string depending on the context and the locale rules.
Transforms a string depending on the context and the locale rules.
Parameters
$str
$usage
- One of
ContextTransforms::USAGE_*
$type
- One of
ContextTransforms::TYPE_*
Returns
string
offsetExists()
,
offsetGet()
Methods inherited from ArrayAccess
offsetSet()
,
offsetUnset()
__toString()
,
get_code()
offsetSet()
,
offsetUnset()
get_repository()
Properties summary
protected
$sections
: array
[]
Magic properties
public read-only
$code
: string
The ISO code of the locale.
public read-only
$language
: string