[ Index ]
 

Code source de PRADO 3.0.6

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

title

Body

[fermer]

/framework/I18N/core/Gettext/ -> TGettext.php (sommaire)

TGettext 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.4 $ $Date: 2005/01/09 23:36:23 $
Poids: 287 lignes (8 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

TGettext:: (8 méthodes):
  factory()
  poFile2moFile()
  prepare()
  meta2array()
  toArray()
  fromArray()
  toMO()
  toPO()


Classe: TGettext  - X-Ref

File_Gettext

GNU gettext file reader and writer.

#################################################################
# All protected members of this class are public in its childs. #
#################################################################

factory($format, $file = '')   X-Ref
Factory

param: string  $format MO or PO
param: string  $file   path to GNU gettext file
return: object  Returns File_Gettext_PO or File_Gettext_MO on success

poFile2moFile($pofile, $mofile)   X-Ref
poFile2moFile

That's a simple fake of the 'msgfmt' console command.  It reads the
contents of a GNU PO file and saves them to a GNU MO file.

param: string  $pofile path to GNU PO file
param: string  $mofile path to GNU MO file
return: mixed   Returns true on success or PEAR_Error on failure.

prepare($string, $reverse = false)   X-Ref
prepare

param: string  $string
param: bool    $reverse
return: string

meta2array($meta)   X-Ref
meta2array

param: string  $meta
return: array

toArray()   X-Ref
toArray

Returns meta info and strings as an array of a structure like that:
<code>
array(
'meta' => array(
'Content-Type'      => 'text/plain; charset=iso-8859-1',
'Last-Translator'   => 'Michael Wallner <mike@iworks.at>',
'PO-Revision-Date'  => '2004-07-21 17:03+0200',
'Language-Team'     => 'German <mail@example.com>',
),
'strings' => array(
'All rights reserved'   => 'Alle Rechte vorbehalten',
'Welcome'               => 'Willkommen',
// ...
)
)
</code>

return: array

fromArray($array)   X-Ref
fromArray

Assigns meta info and strings from an array of a structure like that:
<code>
array(
'meta' => array(
'Content-Type'      => 'text/plain; charset=iso-8859-1',
'Last-Translator'   => 'Michael Wallner <mike@iworks.at>',
'PO-Revision-Date'  => date('Y-m-d H:iO'),
'Language-Team'     => 'German <mail@example.com>',
),
'strings' => array(
'All rights reserved'   => 'Alle Rechte vorbehalten',
'Welcome'               => 'Willkommen',
// ...
)
)
</code>

param: array       $array
return: bool

toMO()   X-Ref
toMO

return: object  File_Gettext_MO

toPO()   X-Ref
toPO

return: object      File_Gettext_PO



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