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

Class: I18N_Messages_Common

Source Location: /I18N-1.0.0/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
  • Author:
  • Version:
  • Access: public

[ Top ]

__construct (Constructor)   [line 56]

I18N_Messages_Common __construct( )

  • Author:
  • Version:
  • Access: public

Overridden in child classes as:

I18N_Messages_File::__construct()
Save Lanuguage and the directory name where language file resides.

[ 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, [ $source = 'default'])

trys to get the language of a given string
  • Return: iso-string for the language
  • Author: Wolfram Kriesing <wolfram@kriesing.de>
  • Version: 01/12/29
  • Access: public

Parameters:

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

[ Top ]

get   [line 133]

void get( [ $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()

Parameters:

   $messageID   — 

[ Top ]

getCharset   [line 206]

void getCharset( )

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

[ Top ]

set   [line 165]

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

Set message ID to corresponding string

Parameters:

   $messageID   — 
   $str   — 

[ Top ]

setCharset   [line 191]

void setCharset( [: $charset = I18N_MESSAGES_DEFAULT_CHARSET])

Set charset of message

Parameters:

:   $charset   —  string Charset

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:36:10 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.