[ Index ] |
|
Code source de Symfony 1.0.0 |
[Code source] [Imprimer] [Statistiques]
sfMessageSource_gettext class file. This program is free software; you can redistribute it and/or modify it under the terms of the BSD License.
Author: | Wei Zhuo |
Version: | $Id: sfMessageSource_gettext.class.php 3148 2007-01-04 19:34:28Z fabien $ |
Poids: | 466 lignes (11 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
sfMessageSource_gettext:: (14 méthodes):
__construct()
loadData()
isValidSource()
getSource()
getLastModified()
getCatalogueList()
getCatalogueByDir()
getVariants()
getPOFile()
save()
delete()
update()
catalogues()
getCatalogues()
Classe: sfMessageSource_gettext - X-Ref
sfMessageSource_gettext class.__construct($source) X-Ref |
Separator between culture name and source. |
loadData($filename) X-Ref |
Load the messages from a MO file. param: string MO file. return: array of messages. |
isValidSource($filename) X-Ref |
Determin if the MO file source is valid. param: string MO file return: boolean true if valid, false otherwise. |
getSource($variant) X-Ref |
Get the MO file for a specific message catalogue and cultural variant. param: string message catalogue return: string full path to the MO file. |
getLastModified($source) X-Ref |
Get the last modified unix-time for this particular catalogue+variant. Just use the file modified time. param: string catalogue+variant return: int last modified in unix-time format. |
getCatalogueList($catalogue) X-Ref |
Get all the variants of a particular catalogue. param: string catalogue name return: array list of all variants for this catalogue. |
getCatalogueByDir($catalogue) X-Ref |
Traverse through the directory structure to find the catalogues. This should only be called by getCatalogueList() param: string a particular catalogue. return: array a list of catalogues. |
getVariants($catalogue = 'messages') X-Ref |
Get the variant for a catalogue depending on the current culture. param: string catalogue return: string the variant. |
getPOFile($MOFile) X-Ref |
Pas de description |
save($catalogue='messages') X-Ref |
Save the list of untranslated blocks to the translation source. If the translation was not found, you should add those strings to the translation source via the <b>append()</b> method. param: string the catalogue to add to return: boolean true if saved successfuly, false otherwise. |
delete($message, $catalogue = 'messages') X-Ref |
Delete a particular message from the specified catalogue. param: string the source message to delete. param: string the catalogue to delete from. return: boolean true if deleted, false otherwise. |
update($text, $target, $comments, $catalogue = 'messages') X-Ref |
Update the translation. param: string the source string. param: string the new translation string. param: string comments param: string the catalogue of the translation. return: boolean true if translation was updated, false otherwise. |
catalogues() X-Ref |
Returns a list of catalogue as key and all it variants as value. return: array list of catalogues |
getCatalogues($dir=null,$variant=null) X-Ref |
Returns a list of catalogue and its culture ID. This takes care of directory structures. E.g. array('messages','en_AU') return: array list of catalogues |
Généré le : Fri Mar 16 22:42:14 2007 | par Balluche grâce à PHPXref 0.7 |