Class language

Description

Language class to perform the majority of language functions in ILance.

  • author: ILance
  • version: $Revision: 1.0.0 $

Located in /api/class.language.inc.php (line 23)


	
			
Variable Summary
mixed $cache
Method Summary
language language ()
string construct_language_pulldown ([ $fieldname = 'languageid'])
array construct_phrase (string $var, mixed $replacements)
integer count_phrases_in_phrasegroup ([integer $phrasegroup = ''])
integer count_unphrased_in_phrasegroup ([integer $phrasegroup = ''], string $slng)
integer fetch_seo_replacements ([integer $languageid = 0])
array init_phrases ()
string print_language_code ([integer $languageid = ''])
void print_language_pulldown ([string $selected = ''], [bool $autosubmit = ''], [string $selectname = ''], [string $optgrouptitle = ''])
integer print_phrase_groups_pulldown ([integer $selected = ''], [bool $autosubmit = ''], string $slng)
Variables
mixed $cache = array() (line 28)

array holding language cache

Methods
Constructor language (line 33)

Constructor

language language ()
construct_language_pulldown (line 179)

Function to construct a language pulldown menu

  • return: HTML formatted language pulldown menu
string construct_language_pulldown ([ $fieldname = 'languageid'])
  • $fieldname
construct_phrase (line 124)

Function to construct a phrase using replacement phrases

  • return: array
array construct_phrase (string $var, mixed $replacements)
  • string $var: phrase string containing [x]'s
  • mixed $replacements: array or string containing our replacements
count_phrases_in_phrasegroup (line 287)

Function to count the number of phrases within a particular phrase group

  • return: Returns the number of phrases in the phrasegroup
integer count_phrases_in_phrasegroup ([integer $phrasegroup = ''])
  • integer $phrasegroup: phrase group
count_unphrased_in_phrasegroup (line 308)

Function to count the number of un-phrased phrases within a particular phrase group

  • return: Returns the number of un-phrased phrases in the phrasegroup
integer count_unphrased_in_phrasegroup ([integer $phrasegroup = ''], string $slng)
  • integer $phrasegroup: phrase group
  • string $slng: short language code
fetch_default_languageid (line 379)

Function to print the site's default language id

  • return: Returns default language id
integer fetch_default_languageid ()
fetch_seo_replacements (line 453)

Function to fetch the seo replacement characters for the seo urls based on the currently selected viewing language

  • return: Returns the phrase group id number
integer fetch_seo_replacements ([integer $languageid = 0])
  • integer $languageid: language id
init_phrases (line 58)

Function to return the language phrases cache array from the datastore.

This function is called just after session_start() within global.php

  • return: array
array init_phrases ()
print_language_code (line 233)

Function to print a language code like english or german, etc

  • return: HTML formatted language pulldown menu
string print_language_code ([integer $languageid = ''])
  • integer $languageid: (optional) language id
print_language_pulldown (line 397)

Function to return site language selection pulldown menu on footer pages

void print_language_pulldown ([string $selected = ''], [bool $autosubmit = ''], [string $selectname = ''], [string $optgrouptitle = ''])
  • string $selected: selected language
  • bool $autosubmit: enable auto-submit once new value is selected?
  • string $selectname: fieldname of pulldown menu
  • string $optgrouptitle: (optional) optgroup title
print_phrase_groups_pulldown (line 337)

Function to print the phrase group pulldown menu

  • return: HTML formatted phrase group pulldown menu
integer print_phrase_groups_pulldown ([integer $selected = ''], [bool $autosubmit = ''], string $slng)
  • integer $selected: (optional) phrase group
  • bool $autosubmit: enable auto-submit?
  • string $slng: short language code
print_short_language_code (line 258)

Function to print a short version of the language code like eng or ger, etc

  • return: HTML formatted default language pulldown menu
string print_short_language_code ()

Documentation generated on Mon, 08 Aug 2011 17:40:55 +0200 by phpDocumentor 1.4.1