class-TMXResourceBundle

It appears that you are using AdBlocking software. The cost of running this website is covered by advertisements. If you like it please feel free to a small amount of money to secure the future of this website.
Overview

Classes

Interfaces

Exceptions

Functions

Class TMXResourceBundle

Package: com\tecnick\tmxphpbridge
Author: Nicola Asuni [www.tecnick.com]
Version: 1.1.005
Brief: TMX-PHP Bridge Class
Class:

TMXResourceBundle This PHP Class reads resource text data directly from a TMX (XML) file. First, the XMLTMXResourceBundle class instantiates itself with two parameters: a TMX file name and a target language name. Then, using an XML parser, it reads all of a translation unit's properties for the key information and specified language data and populates the resource array with them (key -> value).


Located at shared/code/tce_tmx.php
Methods summary
public
# __construct( $tmxfile, $language, $cachefile = '' )

Class constructor.

public
# __destruct( )

Class destructor; resets $resource array.

private
# startElementHandler( $parser, $name, $attribs )

Sets the start element handler function for the XML parser parser.start_element_handler.

private
# endElementHandler( $parser, $name )

Sets the end element handler function for the XML parser parser.end_element_handler.

private
# segContentHandler( $parser, $data )

Sets the character data handler function for the XML parser parser.handler.

public Array.
# getResource( )

Returns the resource array containing the translated word/sentences.

Properties summary
private array $resource

Array used to contain key-translation couples.

# array()
private string $current_key

String Current tu -> tuid value.

# ''
private string $current_data

String Current data value.

# ''
private string $current_language

String Current tuv -> xml:lang value.

# ''
private boolean $segdata

Boolean value true when we are inside a seg element

# false
private string $language

String ISO language identifier (a two- or three-letter code)

# ''
private string $cachefile

String filename for cache

# ''
 

© 2004-2018 – Nicola Asuni - Tecnick.com - All rights reserved.
about - disclaimer - privacy