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

Class: HTML_Template_Flexy_Translator

Source Location: /HTML_Template_Flexy-1.2.2/Flexy/Translator.php

Class Overview




Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 40]


[ Top ]


Class Variables

$appURL =

[line 62]

app URL (copied from above)
  • Access: public

Type:   string


[ Top ]

$languages = array()

[line 63]


Type:   mixed


[ Top ]

$options = array(
        'baseLang'          => 'en',            // the language the templates are in.
        'targetLangs'       => array('fr'),// the language the templates are being translated to.
'templateDir'=>'',// these are read from global config if not set.
'compileDir'=>'','url_rewrite'=>'',// for image rewriting.. -- needs better thinking through!
'appURL'=>'',// url to translation too : eg. /admin/translator.php
)

[line 48]

Options for Translator tool.
  • Access: public

Type:   array


[ Top ]

$status = array()

[line 77]

Array of objects with name, md5's, has it been set, the translation etc.
  • Access: public

Type:   array


[ Top ]

$translate =  ''

[line 84]

The current language
  • Access: public

Type:   array


[ Top ]

$translationMap = array()

[line 249]


Type:   mixed


[ Top ]

$translations = array()

[line 248]


Type:   mixed


[ Top ]

$words = array()

[line 70]

Array of templates and the words found in each one.
  • Access: public

Type:   array


[ Top ]



Method Detail

HTML_Template_Flexy_Translator (Constructor)   [line 98]

none HTML_Template_Flexy_Translator( [array $options = array()])

constructor

Just set options (no checking done)

  • Access: public

Parameters:

array   $options   —  see options array in file.

[ Top ]

clearTemplateCache   [line 377]

none clearTemplateCache( [string $lang = 'en'], [string $d = ''])

delete all the compiled templates in a specified language
  • Access: public

Parameters:

string   $lang   —  language
string   $d   —  subdirectory of templateDir or empty

[ Top ]

compileAll   [line 320]

none compileAll( [string $d = ''])

compile all the templates in a specified folder.
  • Access: public

Parameters:

string   $d   —  subdirectory of templateDir or empty

[ Top ]

getSuggestions   [line 274]

void getSuggestions( $string, $lang)


Parameters:

   $string   — 
   $lang   — 

[ Top ]

getTranslation   [line 298]

void getTranslation( $page, $word, $lang)


Parameters:

   $page   — 
   $word   — 
   $lang   — 

[ Top ]

loadTranslations   [line 259]

void loadTranslations( [string $lang = false])

LoadTranslations - load all the translations from the database into $this->translations[{lang}][{id}] = $translation;
  • Access: public

Parameters:

string   $lang   —  Language

[ Top ]

outputDefaultTemplate   [line 412]

none outputDefaultTemplate( )

output the default template with the editing facilities.
  • Access: public

[ Top ]

process   [line 132]

none process( $get, $post, array $_GET;, array $_POST;)

process the input
  • Access: public

Parameters:

array   $_GET;   —  (translate = en)
array   $_POST;   —  (translate = en, en[{md5}] = translation)
   $get   — 
   $post   — 

[ Top ]


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