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

Class: I18N_Messages_Common

Source Location: /I18N-0.8.2b1/Messages/Common.php

Class Overview


this class provides language functionality, such as determining the language of a given string, etc.


Author(s):

Version:

  • 2001/12/29

Methods


Child classes:

I18N_Messages_File
Get message, and charset from php file, and return corresponding message when get() is called.

Inherited Variables

Inherited Methods


Class Details

[line 34]
this class provides language functionality, such as determining the language of a given string, etc.

iso639-1 compliant, 2 letter code is used iso639-1 http://www.loc.gov/standards/iso639-2/langcodes.html



[ Top ]


Method Detail

I18N_Messages_Common (Constructor)   [line 73]

I18N_Messages_Common I18N_Messages_Common( )

for pre-ZE2 compatibility
  • Version:
  • Author:
  • Access: public

[ Top ]

bindDomain   [line 225]

void bindDomain( [: $domain = ''])

Bind domain to use If domain is not passed and there's already a value set to domain, then this method returns current domain.

Parameters:

:   $domain     string

[ Top ]

bindLanguage   [line 248]

void bindLanguage( [: $lang = ''])

Bind language to use If language is not passed and there's already a value set to domain, then this method returns current domain.

Parameters:

:   $lang     string

[ Top ]

determineLanguage   [line 91]

string determineLanguage( string $string, [mixed $source = 'default'])

trys to get the language of a given string

Parameters:

string   $string     the string which is used to try and determine its language

[ Top ]

get   [line 133]

void get( [mixed $messageID = ""])

Look for and return the message corresponds to the messageID passed.

Returns messageID when the corresponding message is not found


Overridden in child classes as:

I18N_Messages_File::get()

[ Top ]

getCharset   [line 206]

void getCharset( )

Returns charset of message. Returns null if it's not set.

[ Top ]

set   [line 165]

void set( [mixed $messageID = ""], [mixed $str = ""])

Set message ID to corresponding string

[ Top ]

setCharset   [line 191]

void setCharset( [: $charset = I18N_MESSAGES_DEFAULT_CHARSET])

Set charset of message

Parameters:

:   $charset     string Charset

[ Top ]

__construct   [line 56]

void __construct( )

  • Version:
  • Author:
  • Access: public

[ Top ]


Documentation generated on Fri, 30 Apr 2004 21:51:30 +0200 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.