[ Index ] |
|
Code source de PRADO 3.0.6 |
[Code source] [Imprimer] [Statistiques]
TGlobalization class file.
Author: | Wei Zhuo |
Copyright: | Copyright © 2005 PradoSoft |
License: | http://www.pradosoft.com/license/ |
Version: | $Id: TGlobalization.php 1442 2006-09-23 07:34:58Z wei $ |
Poids: | 269 lignes (7 kb) |
Inclus ou requis: | 1 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
TGlobalization:: (15 méthodes):
init()
getDefaultCulture()
setDefaultCulture()
getDefaultCharset()
setDefaultCharset()
getCulture()
setCulture()
getCharset()
setCharset()
getTranslationConfiguration()
setTranslationConfiguration()
getTranslationCatalogue()
setTranslationCatalogue()
getCultureVariants()
getLocalizedResource()
Classe: TGlobalization - X-Ref
TGlobalization contains settings for Culture, Charsetinit($xml) X-Ref |
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. param: TXmlElement application configuration |
getDefaultCulture() X-Ref |
return: string default culture |
setDefaultCulture($culture) X-Ref |
param: string default culture, e.g. <tt>en_US</tt> for American English |
getDefaultCharset() X-Ref |
return: string default charset set |
setDefaultCharset($charset) X-Ref |
param: string default localization charset, e.g. <tt>UTF-8</tt> |
getCulture() X-Ref |
return: string current application culture |
setCulture($culture) X-Ref |
param: string culture, e.g. <tt>en_US</tt> for American English |
getCharset() X-Ref |
return: string localization charset |
setCharset($charset) X-Ref |
param: string localization charset, e.g. <tt>UTF-8</tt> |
getTranslationConfiguration() X-Ref |
return: TMap translation source configuration. |
setTranslationConfiguration(TMap $config) X-Ref |
Sets the translation configuration. Example configuration: <code> $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 '@@' </code> Throws exception is source is not found. param: TMap configuration options |
getTranslationCatalogue() X-Ref |
return: string current translation catalogue. |
setTranslationCatalogue($value) X-Ref |
param: string update the translation catalogue. |
getCultureVariants($culture=null) X-Ref |
Gets all the variants of a specific culture. If the parameter $culture is null, the current culture is used. param: string $culture the Culture string return: array variants of the culture. |
getLocalizedResource($file,$culture=null) X-Ref |
Returns a list of possible localized files. Example <code> $files = $app->getLocalizedResource("path/to/Home.page","en_US"); </code> will return <pre> 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' </pre> Note that you still need to verify the existance of these files. param: string filename param: string culture string, null to use current culture return: array list of possible localized resource files. |
Généré le : Sun Feb 25 21:07:04 2007 | par Balluche grâce à PHPXref 0.7 |