XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
XCube_LanguageManager Class Reference
Inheritance diagram for XCube_LanguageManager:
Legacy_LanguageManager AltsysLangMgr_LanguageManager

Public Member Functions

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

Data Fields

 $mLanguageName
 
 $mLocaleName
 

Detailed Description

Definition at line 26 of file XCube_LanguageManager.class.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Definition at line 39 of file XCube_LanguageManager.class.php.

Member Function Documentation

◆ decodeUTF8()

decodeUTF8 ( $str)

Definition at line 190 of file XCube_LanguageManager.class.php.

◆ encodeUTF8()

encodeUTF8 ( $str)

Definition at line 186 of file XCube_LanguageManager.class.php.

◆ existFile()

existFile ( string $section,
string $filename )

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

@access public

Parameters
string$sectionA name of section.
string$filenameA name of file
Returns
void

Reimplemented in Legacy_LanguageManager.

Definition at line 122 of file XCube_LanguageManager.class.php.

◆ getFallbackLanguage()

getFallbackLanguage ( )

Return default language name.

@access protected

Returns
string

Reimplemented in Legacy_LanguageManager.

Definition at line 170 of file XCube_LanguageManager.class.php.

◆ getFallbackLocale()

getFallbackLocale ( )

Return default locale name.

@access protected

Returns
string

Definition at line 181 of file XCube_LanguageManager.class.php.

◆ getFilepath()

getFilepath ( string $section,
string $filename )

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

@access public

Parameters
string$sectionA name of section.
string$filenameA name of file
Returns
string

Reimplemented in Legacy_LanguageManager.

Definition at line 135 of file XCube_LanguageManager.class.php.

◆ getLanguage()

getLanguage ( )

Get language name.

Returns
string language name

Definition at line 84 of file XCube_LanguageManager.class.php.

◆ getLocale()

getLocale ( )

Get locale name.

Returns
string locale name

Definition at line 65 of file XCube_LanguageManager.class.php.

◆ loadGlobalMessageCatalog()

loadGlobalMessageCatalog ( )

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

Reimplemented in AltsysLangMgr_LanguageManager, and Legacy_LanguageManager.

Definition at line 92 of file XCube_LanguageManager.class.php.

◆ loadModuleMessageCatalog()

loadModuleMessageCatalog ( string $moduleName)

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

Parameters
string$moduleNameA name of module.

Reimplemented in Legacy_LanguageManager.

Definition at line 101 of file XCube_LanguageManager.class.php.

◆ loadTextFile()

loadTextFile ( string $section,
string $filename )

Get file contents and return it.

@access public

Parameters
string$sectionA name of section.
string$filenameA name of file
Returns
string

Reimplemented in Legacy_LanguageManager.

Definition at line 148 of file XCube_LanguageManager.class.php.

◆ loadThemeMessageCatalog()

loadThemeMessageCatalog ( string $themeName)

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

Parameters
string$themeNameA name of theme.

Definition at line 109 of file XCube_LanguageManager.class.php.

◆ prepare()

prepare ( )

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

Reimplemented in AltsysLangMgr_LanguageManager, and Legacy_LanguageManager.

Definition at line 48 of file XCube_LanguageManager.class.php.

◆ setLanguage()

setLanguage ( $language)

Set language name.

Parameters
string$languagelanguage name

Definition at line 75 of file XCube_LanguageManager.class.php.

◆ setLocale()

setLocale ( $locale)

Set string locale name.

Parameters
$locale

Definition at line 56 of file XCube_LanguageManager.class.php.

◆ translate()

translate ( string $word)

Return translated message.

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

Definition at line 160 of file XCube_LanguageManager.class.php.

Field Documentation

◆ $mLanguageName

$mLanguageName

Definition at line 31 of file XCube_LanguageManager.class.php.

◆ $mLocaleName

$mLocaleName

Definition at line 37 of file XCube_LanguageManager.class.php.


The documentation for this class was generated from the following file: