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

Class: I18n

Source Location: /client/Internationalization.php

Class Overview


Translator selection


Variables

Methods



Class Details

[line 30]
Translator selection

The translator is selected using client.ini's I18nClass.




[ Top ]


Class Variables

$i18n =

[line 36]

Translator



Tags:

access:  private
static:  

Type:   I18nInterface


[ Top ]



Class Methods


method bindtextdomain [line 160]

string bindtextdomain( string $domain, string $path)

Calls translator's bindtextdomain



Tags:

return:  full path
access:  private
static:  


Parameters:

string   $domain   domain
string   $path   path to tranlsations

[ Top ]

method getLocales [line 60]

array getLocales( )

Returns available locales

Looks for two-characters directories in locale directory.




Tags:

return:  array of locales (two-characters strings)
access:  public
static:  


[ Top ]

method gt [line 178]

string gt( string $text)

Calls translator's gettext



Tags:

return:  tranlated text
access:  public
static:  


Parameters:

string   $text   text to translate

[ Top ]

method init [line 44]

void init( ClientConfig $config)

Initializes locales

Default language is set in configuration file (variable defaultLang).




Tags:

access:  public
static:  


Parameters:

ClientConfig   $config  

[ Top ]

method ngt [line 193]

string ngt( string $text, string $plural, int $count)

Calls translator's ngettext



Tags:

return:  translated text
access:  public
static:  


Parameters:

string   $text   text to translate
string   $plural   text to translate (plural)
int   $count   count

[ Top ]

method setLocale [line 86]

void setLocale( string $defaultLang)

Sets the locale depending on URL, browser or config

Looks for language in:

  • $_SERVER['LANG']
  • Cookie
  • $_SERVER['HTTP_ACCEPT_LANGUAGE']
If no language is found, default language is set.




Tags:

access:  public
static:  


Parameters:

string   $defaultLang   default language

[ Top ]

method textdomain [line 169]

string textdomain( string $domain)

Calls translator's textdomain



Tags:

return:  domain
access:  private
static:  


Parameters:

string   $domain   domain

[ Top ]


Documentation generated on Wed, 6 Apr 2005 12:06:41 +0200 by phpDocumentor 1.3.0RC3