## Class Language

Description

Implements language negotiation

- version: $Id: class.Language.inc,v 1.3 2002/12/03 13:16:17 letreo Exp $
- access: public
- author: Carlos Falo Hervás <carles@bisinteractive.net> http://www.bisinteractive.net/

Located in Program_Root/include/class.Language.inc (line 36)

Variable Summary
int $langs
array $lang_list
Method Summary
void Language ()
int find_lang (mixed $loc)
int get_list (mixed $arr, mixed &$sublist)
int get_primarylang ()
int get_primaryprefix ()
int is_primarylang (mixed $locale)
void print_list ()
Variables
int $langs (line 45)

Counter for how many languages are supported

- see: lang_init()
- access: public

array $lang_list (line 54)

Language List [lang,q] pairs

- see: lang_init()
- access: public

Methods
Constructor Language (line 72)

Constructor.

Sets values for initial workout

- access: public

void Language ()
find_lang (line 136)

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 161)

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 108)

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 122)

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 84)

Compares given locale PREFIX with PRIMARY LANG PREFIX

- return: if given locale PREFIX matches PRIMARY LANG PREFIX
- access: public

int is_primarylang (mixed $locale)
print_list (line 189)

- access: public

void print_list ()

Documention generated on Fri, 2 May 2003 10:50:46 +0200 by phpDocumentor 1.2.0rc2