Class Language

Description

Implements language negotiation

Implements language negotiation

Located in /include/class.Language.inc (line 38)


	
			
Variable Summary
 string $accept_lang
 int $langs
 array $lang_list
Method Summary
 Language Language ()
 int find_lang (mixed $loc)
 int get_list (mixed $arr, mixed &$sublist)
 int is_primarylang (mixed $locale)
 array lang_init ()
 void print_list ()
 void reset_list ()
Variables
string $accept_lang (line 65)

Original http header field HTTP_ACCEPT_LANGUAGES

Original http header field HTTP_ACCEPT_LANGUAGES

  • see: lang_detect()
  • access: private
int $langs = 0 (line 47)

Counter for how many languages are supported

Counter for how many languages are supported

array $lang_list (line 56)

Language List [lang,q] pairs

Language List [lang,q] pairs

Methods
Constructor Language (line 74)

Constructor.

Constructor. Sets values for initial workout

  • access: public
Language Language ()
find_lang (line 138)

Retunrs QUALITY for PREFIX in given $loc (QUALITY = q*100 -> percent)

Retunrs QUALITY for PREFIX in given $loc (QUALITY = q*100 -> percent)

  • return: for the PREFIX in given locale
  • access: public
int find_lang (mixed $loc)
get_list (line 163)

Fills sublist with an ordered list of accepted languages from given array based on each locale PREFIX. the array is best match from the given list.

Fills sublist with an ordered list of accepted languages from given array based on each locale PREFIX... ordering is on Q DESC so first element in the array is best match from the given list.

  • access: public
int get_list (mixed $arr, mixed &$sublist)
get_primarylang (line 110)

Compares given locale PREFIX with PRIMARY LANG PREFIX

Compares given locale PREFIX with PRIMARY LANG PREFIX

  • return: if given locale PREFIX matches PRIMARY LANG PREFIX
  • access: public
int get_primarylang ()
get_primaryprefix (line 124)

Returns the PREFIX string for the client's primary language selection

Returns the PREFIX string for the client's primary language selection

  • return: PREFIX string for primary language
  • access: public
int get_primaryprefix ()
is_primarylang (line 86)

Compares given locale PREFIX with PRIMARY LANG PREFIX

Compares given locale PREFIX with PRIMARY LANG PREFIX

  • return: if given locale PREFIX matches PRIMARY LANG PREFIX
  • access: public
int is_primarylang (mixed $locale)
lang_init (line 205)

Initialize language list

Initialize language list

  • access: private
array lang_init ()
print_list (line 190)
  • access: public
void print_list ()
reset_list (line 235)

Reset language list

Reset language list

  • access: private
void reset_list ()

Documentation generated on Tue, 29 Jun 2004 14:42:07 +0200 by phpDocumentor 1.3.0RC3