[ Index ]
 

Code source de PRADO 3.0.6

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/framework/I18N/core/ -> MessageSource_XLIFF.php (sommaire)

MessageSource_XLIFF 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: $Revision: 1.8 $ $Date: 2005/12/17 06:11:28 $
Poids: 515 lignes (13 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

MessageSource_XLIFF:: (15 méthodes):
  __construct()
  loadData()
  getLastModified()
  getSource()
  isValidSource()
  getCatalogueList()
  getCatalogueByDir()
  catalogues()
  getCatalogues()
  getVariants()
  save()
  update()
  delete()
  createMessageTemplate()
  getTemplate()


Classe: MessageSource_XLIFF  - X-Ref

MessageSource_XLIFF class.

Using XML XLIFF format as the message source for translation.
Details and example of XLIFF can be found in the following URLs.

# http://www.opentag.com/xliff.htm
# http://www-106.ibm.com/developerworks/xml/library/x-localis2/

See the MessageSource::factory() method to instantiate this class.

__construct($source)   X-Ref
Constructor.

param: string the directory where the messages are stored.

loadData($filename)   X-Ref
Load the messages from a XLIFF file.

param: string XLIFF file.
return: array of messages.

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.

getSource($variant)   X-Ref
Get the XLIFF file for a specific message catalogue and cultural
vairant.

param: string message catalogue
return: string full path to the XLIFF file.

isValidSource($source)   X-Ref
Determin if the XLIFF file source is valid.

param: string XLIFF file
return: boolean true if valid, false otherwise.

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.

catalogues()   X-Ref
Returns a list of catalogue and its culture ID.
E.g. array('messages','en_AU')

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

getVariants($catalogue='messages')   X-Ref
Get the variant for a catalogue depending on the current culture.

param: string catalogue
return: string the variant.

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.

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 to save to.
return: boolean true if translation was updated, 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.

createMessageTemplate($catalogue)   X-Ref
Pas de description

getTemplate($catalogue)   X-Ref
Pas de description



Généré le : Sun Feb 25 21:07:04 2007 par Balluche grâce à PHPXref 0.7