TGlobalization contains settings for Culture, Charset and TranslationConfiguration.
TGlobalization can be subclassed to change how the Culture, Charset are determined. See TGlobalizationAutoDetect for example of setting the Culture based on browser settings.
Located in /I18N/TGlobalization.php (line 27)
TComponent | --TApplicationComponent | --TModule | --TGlobalization
Class | Description |
---|---|
TGlobalizationAutoDetect | TGlobalizationAutoDetect class will automatically try to resolve the default culture using the user browser language settings. |
Gets all the variants of a specific culture. If the parameter $culture is null, the current culture is used.
Returns a list of possible localized files. Example
will return
- $files = $app->getLocalizedResource("path/to/Home.page","en_US");
array 0 => 'path/to/en_US/Home.page' 1 => 'path/to/en/Home.page' 2 => 'path/to/Home.en_US.page' 3 => 'path/to/Home.en.page' 4 => 'path/to/Home.page'Note that you still need to verify the existance of these files.
Initialize the Culture and Charset for this application.
You should override this method if you want a different way of setting the Culture and/or Charset for your application. If you override this method, call parent::init($xml) first.
Sets the translation configuration. Example configuration:
Throws exception is source is not found.
- $config['type'] = 'XLIFF'; //XLIFF, gettext, mysql or sqlite
- $config['source'] = 'Path.to.directory'; //or database connection string
- $config['catalogue'] = 'messages'; //default catalog
- $config['autosave'] = 'true'; //save untranslated message
- $config['cache'] = 'true'; //cache translated message
- $config['marker'] = '@@'; // surround untranslated text with '@@'
Inherited From TModule
TModule::getID()
TModule::init()
TModule::setID()
Inherited From TApplicationComponent
TApplicationComponent::getApplication()
TApplicationComponent::getRequest()
TApplicationComponent::getResponse()
TApplicationComponent::getService()
TApplicationComponent::getSession()
TApplicationComponent::getUser()
TApplicationComponent::publishAsset()
TApplicationComponent::publishFilePath()
Inherited From TComponent
TComponent::addParsedObject()
TComponent::attachEventHandler()
TComponent::canGetProperty()
TComponent::canSetProperty()
TComponent::createdOnTemplate()
TComponent::detachEventHandler()
TComponent::evaluateExpression()
TComponent::evaluateStatements()
TComponent::getEventHandlers()
TComponent::getSubProperty()
TComponent::hasEvent()
TComponent::hasEventHandler()
TComponent::hasProperty()
TComponent::raiseEvent()
TComponent::setSubProperty()
TComponent::__get()
TComponent::__set()
Documentation generated on Mon, 21 Apr 2008 11:35:04 -0400 by phpDocumentor 1.3.0RC4