Autodoc
  • Namespace
  • Class
  • Tree

Namespaces

  • BlueTihi
    • Context
  • Brickrouge
    • Element
      • Nodes
    • Renderer
    • Widget
  • ICanBoogie
    • ActiveRecord
    • AutoConfig
    • CLDR
    • Composer
    • Core
    • Event
    • Exception
    • HTTP
      • Dispatcher
      • Request
    • I18n
      • Translator
    • Mailer
    • Modules
      • Taxonomy
        • Support
      • Thumbnailer
        • Versions
    • Object
    • Operation
      • Dispatcher
    • Prototype
    • Routes
    • Routing
      • Dispatcher
    • Session
  • Icybee
    • ActiveRecord
      • Model
    • ConfigOperation
    • Document
    • EditBlock
    • Element
      • ActionbarContextual
      • ActionbarSearch
      • ActionbarToolbar
    • FormBlock
    • Installer
    • ManageBlock
    • Modules
      • Articles
      • Cache
        • Collection
        • ManageBlock
      • Comments
        • ManageBlock
      • Contents
        • ManageBlock
      • Dashboard
      • Editor
        • Collection
      • Files
        • File
        • ManageBlock
      • Forms
        • Form
        • ManageBlock
      • I18n
      • Images
        • ManageBlock
      • Members
      • Modules
        • ManageBlock
      • Nodes
        • ManageBlock
        • Module
      • Pages
        • BreadcrumbElement
        • LanguagesElement
        • ManageBlock
        • NavigationBranchElement
        • NavigationElement
        • Page
        • PageController
      • Registry
      • Search
      • Seo
      • Sites
        • ManageBlock
      • Taxonomy
        • Terms
          • ManageBlock
        • Vocabulary
          • ManageBlock
      • Users
        • ManageBlock
        • NonceLogin
        • Roles
      • Views
        • ActiveRecordProvider
        • Collection
        • View
    • Operation
      • ActiveRecord
      • Constructor
      • Module
      • Widget
    • Rendering
  • None
  • Patron
  • PHP

Classes

  • FormattedString
  • Helpers
  • Locale
  • NumberFormatter
  • Translator

Functions

  • date_period
  • format_currency
  • format_date
  • format_datetime
  • format_number
  • format_size
  • format_time
  • get_cldr
  • get_language
  • get_locale
  • set_locale
  • t

Class Translator

Together with the Prototype class the ICanBoogie\Object class provides means to define getters and setters, as well as define getters, setters, and method at runtime.

The class also provides a method to create instances in the same fashion PDO creates instances with the FETCH_CLASS mode, that is the properties of the instance are set before its constructor is invoked.

ICanBoogie\Object implements ICanBoogie\ToArrayRecursive uses ICanBoogie\ToArrayRecursiveTrait, ICanBoogie\PrototypeTrait
Extended by ICanBoogie\I18n\Translator implements ArrayAccess
Namespace: ICanBoogie\I18n
Located at vendor/icanboogie/i18n/lib/translator.php

Methods summary

public static ICanBoogie\I18n\Translator
# get( string $id )

Return the translator for the specified locale.

Return the translator for the specified locale.

Parameters

$id
string
$id The locale identifier.

Returns

ICanBoogie\I18n\Translator
The translator for the locale.
protected static
# get_cache( )
public static
# messages_construct( mixed $id )
protected
# lazy_get_messages( )
protected ICanBoogie\I18n\Translator|null
# lazy_get_fallback( )

Returns a translator fallback for this translator.

Returns a translator fallback for this translator.

Returns

ICanBoogie\I18n\Translator|null
The translator fallback for this translator or null if there is none.
protected
# __construct( string $id )

Constructor.

Constructor.

Parameters

$id
string
$id Locale identifier
public string
# __invoke( string $native, array $args = array(), array $options = array() )

Translate a native string in a locale string.

Translate a native string in a locale string.

Parameters

$native
string
$native The native string to translate.
$args
array
$args
$options
array
$options

Returns

string
The translated string, or the same native string if no translation could be found.
public
# offsetExists( mixed $offset )

Implementation of

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

Implementation of

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

Implementation of

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

Implementation of

ArrayAccess::offsetUnset()

Methods inherited from ICanBoogie\Object

from(), resolve_facade_properties(), resolve_private_properties(), to_array(), to_json()

Methods inherited from ICanBoogie\ToArrayRecursive

to_array_recursive()

Methods used from ICanBoogie\ToArrayRecursiveTrait

to_array_recursive()

Methods used from ICanBoogie\PrototypeTrait

__call(), __get(), __set(), __sleep(), __wakeup(), get_prototype(), has_method(), has_property(), last_chance_get(), last_chance_set()

Magic methods summary

Properties summary

protected static mixed $cache
#
protected array $messages
#

Translation messages.

Translation messages.

protected ICanBoogie\I18n\Translator $fallback
#

Fallback translator.

Fallback translator.

protected string $id
#

Locale id for this translator.

Locale id for this translator.

public static array $missing
#

Magic properties inherited from ICanBoogie\Object

$prototype

Autodoc API documentation generated by ApiGen 2.8.0