Arbit - project tracking

Arbit - project tracking

API documentation :: Docs For Class arbitTranslationManager

Core::View::arbitTranslationManager

Class arbitTranslationManager

Translation manager for arbit.

Translation manager for arbit. Handles multiple backends for caching of the translations, and creates translation file entries for missing translation items.

ezcTranslationManager
   |
   --arbitTranslationManager
Author(s):
Version:   $Revision: 1692 $
License:   GPL

Member Variables

public static bool $updateTranslations
Flag indicating whether translation files should be updated on the fly.

Flag indicating whether translation files should be updated on the fly. Should only be enabled during development.

protected ezcTranslationBackendInterface $backend
The backend in use which is responsible for reading in the context and returning it to the manager.

The backend in use which is responsible for reading in the context and returning it to the manager.

protected string $defaultLocale = 'en'
Default locale, if no locale is explicitely passed to fetch methods.

Default locale, if no locale is explicitely passed to fetch methods.

Method Summary

public arbitTranslationManager __construct( [ $backend = null] )
Constructs an ezcTranslationManager object This constructor constructs a new ezcTranslationManager object. parameter is a class that implements the ezcTranslationBackendInterface.
public ezcTranslation getContext( $locale , $context )
Returns the translations for the $context context and the locale $locale.
public void setDefaultLocale( $locale )
Set default locale

Methods

__construct

arbitTranslationManager __construct( [ $backend = null] )

Constructs an ezcTranslationManager object This constructor constructs a new ezcTranslationManager object. parameter is a class that implements the ezcTranslationBackendInterface.

Constructs an ezcTranslationManager object This constructor constructs a new ezcTranslationManager object. The only parameter is a class that implements the ezcTranslationBackendInterface.

Parameters:
Name Type Description
$backend ezcTranslationBackend An instance of a translation backend.

getContext

ezcTranslation getContext( string $locale , string $context )

Returns the translations for the $context context and the locale $locale.

Returns the translations for the $context context and the locale $locale. This methods reads the context data from the backend and applies the filters before returning the translation map as part of the ezcTranslation object that it returns.

Parameters:
Name Type Description
$locale string
$context string

setDefaultLocale

void setDefaultLocale( string $locale )

Set default locale

Set default locale

Parameters:
Name Type Description
$locale string
Documentation generated on Mon, 05 Apr 2010 14:02:20 +0200 by phpDocumentor 1.4.3