XCube_LanguageManager Class Reference

Inherited by Legacy_LanguageManager.

List of all members.

Public Member Functions

 prepare ()
 setLocale ($locale)
 getLocale ()
 setLanguage ($language)
 getLanguage ()
 loadGlobalMessageCatalog ()
 loadModuleMessageCatalog ($moduleName)
 loadThemeMessageCatalog ($themeName)
 existFile ($section, $filename)
 getFilepath ($section, $filename)
 loadTextFile ($section, $filename)
 translate ($word)
 getFallbackLanguage ()
 getFallbackLocale ()


Detailed Description

This class manages resources of each languages. By requests of other components, this class loads files, or checks the existence of the specified resource, or composes filepath to access real files. And, it manages some locale informations.

Rules about language are different at each bases. So it's important that a base defines the sub class of this class if it can't use this class directly.

And, XCube or bases have to make each languages possible to have its sub class. By that, languages become able to implement their logic to solve problems.

This class calls sub directories of each languages 'section'. 'section' is used to load image files and etc.


Member Function Documentation

XCube_LanguageManager::prepare (  ) 

Normally, this member function is called soon, after constructor. To follow the base, initialize.

XCube_LanguageManager::setLocale ( locale  ) 

Set locale name.

Parameters:
string $local locale name

XCube_LanguageManager::getLocale (  ) 

Get locale name.

Returns:
string locale name

XCube_LanguageManager::setLanguage ( language  ) 

Set language name.

Parameters:
string $language language name

XCube_LanguageManager::getLanguage (  ) 

Get language name.

Returns:
string language name

XCube_LanguageManager::loadGlobalMessageCatalog (  ) 

Load the global message catalog which is defined in the base module.

XCube_LanguageManager::loadModuleMessageCatalog ( moduleName  ) 

Load the module message catalog which is defined in the specified module.

Parameters:
string $moduleName A name of module.

XCube_LanguageManager::loadThemeMessageCatalog ( themeName  ) 

Load the theme message catalog which is defined in the specified module.

Parameters:
string $themeName A name of theme.

XCube_LanguageManager::existFile ( section,
filename 
)

check the exstence of the specified file in the specified section.

public

Parameters:
string $section A name of section.
string $filename A name of file
Returns:
bool

XCube_LanguageManager::getFilepath ( section,
filename 
)

Return the file path by the specified section and the specified file.

public

Parameters:
string $section A name of section.
string $filename A name of file
Returns:
string

XCube_LanguageManager::loadTextFile ( section,
filename 
)

Get file contents and return it.

public

Parameters:
string $section A name of section.
string $filename A name of file
Returns:
string

XCube_LanguageManager::translate ( word  ) 

Return translated message.

Parameters:
string $word
Returns:
string
Note:
This member function is test.

XCube_LanguageManager::getFallbackLanguage (  ) 

Return default language name.

protected

Returns:
string

XCube_LanguageManager::getFallbackLocale (  ) 

Return default locale name.

protected

Returns:
string


The documentation for this class was generated from the following file:
Generated on Thu Nov 2 00:27:23 2006 for XOOPS Cube Legacy by  doxygen 1.5.1