Overview

Namespaces

  • Nethgui
    • Adapter
    • Authorization
    • Component
    • Controller
      • Collection
      • Table
    • Exception
    • Log
    • Model
    • Module
      • Help
      • Notification
    • Renderer
    • Serializer
    • System
    • Test
      • Tool
      • Unit
        • Nethgui
          • Adapter
            • ParameterSet
          • Authorization
          • Log
          • Module
            • Notification
          • Renderer
          • Serializer
          • System
          • Utility
          • View
        • Test
          • Tool
    • Utility
    • View
    • Widget
      • Xhtml
  • None
  • Test
    • Tool

Classes

  • LegacyCommandBag
  • Translator
  • View

Interfaces

  • CommandReceiverInterface
  • TranslatorInterface
  • ViewableInterface
  • ViewInterface
  • Overview
  • Namespace
  • Class
  • Deprecated

Class Translator

Search for a string translation looking to all the language catalogs provided by a hierarchy of modules.

The string lookup procedes up to the root of the hierarchy by invoking the module getParent() method.

Nethgui\View\Translator implements Nethgui\View\TranslatorInterface, Nethgui\Utility\PhpConsumerInterface, Nethgui\Log\LogConsumerInterface
Namespace: Nethgui\View
Author: Davide Principi davide.principi@nethesis.it
Located at View/Translator.php
Methods summary
public
# __construct( string $languageCode, callable $catalogResolver, array $notUsed = array() )

Parameters

$languageCode
639-1 language code (2 characters)
$catalogResolver
$notUsed
$initialCatalogStack
public string
# translate( Nethgui\Module\ModuleInterface $module, string $key, array $args = array(), string $languageCode = NULL )

Translate $key substituting $args

Translate $key substituting $args

Any occurence of "${ID}" in the translated string is substituted by the value in $args corresponding to index "ID".

Parameters

$module
$key
The string to be translated
$args
Values substituted in output string.
$languageCode
The language code

Returns

string

See

strtr()

Implementation of

Nethgui\View\TranslatorInterface::translate()
public Nethgui\Utility\PhpConsumerInterface
# setPhpWrapper( Nethgui\Utility\PhpWrapper $object )

Parameters

$object

Returns

Nethgui\Utility\PhpConsumerInterface

Implementation of

Nethgui\Utility\PhpConsumerInterface::setPhpWrapper()
public Nethgui\Log\LogInterface
# getLog( )

The log attached to the interface implementor

The log attached to the interface implementor

Returns

Nethgui\Log\LogInterface

Api

Implementation of

Nethgui\Log\LogConsumerInterface::getLog()
public Nethgui\Log\LogConsumerInterface
# setLog( Nethgui\Log\LogInterface $log )

Change the log attached to the interface implementor

Change the log attached to the interface implementor

Parameters

$log

Returns

Nethgui\Log\LogConsumerInterface

Api

Implementation of

Nethgui\Log\LogConsumerInterface::setLog()
public string
# getLanguageCode( )

Get the default language code

Get the default language code

Returns

string
ISO 639-1 language code (2 characters).

Api

Implementation of

Nethgui\View\TranslatorInterface::getLanguageCode()
Nethgui Framework API documentation generated by ApiGen