Translation2
[ class tree: Translation2 ] [ index: Translation2 ] [ all elements ]

Class: Translation2_Admin_Container_gettext

Source Location: /Translation2-2.0.0beta10/Admin/Container/gettext.php

Class Overview

Translation2_Container
   |
   --Translation2_Container_gettext
      |
      --Translation2_Admin_Container_gettext

Storage driver for storing/fetching data to/from a gettext file


Author(s):

Version:

  • CVS: $Id: gettext.php,v 1.25 2006/01/07 16:44:28 quipo Exp $

Copyright:

  • 2004-2005 Lorenzo Alberton, Michael Wallner

Methods


Inherited Variables

Inherited Methods

Class: Translation2_Container_gettext

Translation2_Container_gettext::fetchLangs()
Fetch the available langs if they're not cached yet.
Translation2_Container_gettext::getOne()
Get a single item from the container, without caching the whole page
Translation2_Container_gettext::getPage()
Get all the strings from a domain (parsing the .mo file)
Translation2_Container_gettext::getStringID()
Get the stringID for the given string
Translation2_Container_gettext::init()
Initialize the container
Translation2_Container_gettext::setLang()
Sets the current lang

Class: Translation2_Container

Translation2_Container::Translation2_Container()
Constructor
Translation2_Container::fetchLangs()
Fetch the available langs if they're not cached yet.
Translation2_Container::getLang()
Gets the current lang
Translation2_Container::getLangData()
Gets the array data for the lang
Translation2_Container::getLangs()
Gets the available languages
Translation2_Container::getOne()
Get a single item from the container, without caching the whole page Containers should implement this method.
Translation2_Container::getPage()
Returns an array of the strings in the selected page Containers should implement this method.
Translation2_Container::getStringID()
Get the stringID for the given string
Translation2_Container::raiseError()
Trigger a PEAR error
Translation2_Container::setLang()
Sets the current lang
Translation2_Container::_parseOptions()
Parse options passed to the container class

Class Details

[line 59]
Storage driver for storing/fetching data to/from a gettext file

This storage driver requires the gettext extension



[ Top ]


Method Detail

add   [line 133]

mixed add( string $stringID, string $pageID, array $strings)

Add a new entry in the strings domain.
  • Return: true on success, PEAR_Error on failure

Parameters:

string   $stringID   — 
string   $pageID   — 
array   $strings   —  Associative array with string translations. Sample format: array('en' => 'sample', 'it' => 'esempio')

[ Top ]

addLang   [line 76]

mixed addLang( array $langData, [ $path = null])

Creates a new entry in the langs_avail .ini file.
  • Return: Returns true on success or PEAR_Error on failure.

Parameters:

array   $langData   — 
   $path   — 

[ Top ]

addLangToList   [line 113]

mixed addLangToList( array $langData)

Creates a new entry in the langsAvail .ini file.

If the file doesn't exist yet, it is created.

  • Return: true on success, PEAR_Error on failure

Parameters:

array   $langData   —  array('lang_id' => 'en', 'name' => 'english', 'meta' => 'some meta info', 'error_text' => 'not available' 'encoding' => 'iso-8859-1', );

[ Top ]

begin   [line 281]

void begin( )

Begin
  • Access: public

[ Top ]

commit   [line 295]

mixed commit( )

Commit
  • Return: Returns true on success or PEAR_Error on failure.
  • Access: public

[ Top ]

getPageNames   [line 267]

array getPageNames( )

Get a list of all the domains
  • Access: public

[ Top ]

remove   [line 173]

mixed remove( string $stringID, string $pageID)

Remove an entry from the domain.
  • Return: true on success, PEAR_Error on failure

Parameters:

string   $stringID   — 
string   $pageID   — 

[ Top ]

removeLang   [line 221]

true|PEAR_Error removeLang( string $langID, [bool $force = false])

Remove Language
  • Access: public

Parameters:

string   $langID   — 
bool   $force   —  (unused)

[ Top ]

update   [line 205]

mixed update( string $stringID, string $pageID, array $strings)

Update

Alias for Translation2_Admin_Container_gettext::add()


Parameters:

string   $stringID   — 
string   $pageID   — 
array   $strings   — 

[ Top ]

updateLang   [line 250]

mixed updateLang( array $langData)

Update the lang info in the langs_avail file
  • Return: Returns true on success or PEAR_Error on failure.
  • Access: public

Parameters:

array   $langData   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:41:44 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.