STPHPObject | --STPHPLocale
Located in File: Program_Root/stphplocale.php
stphplib
Roberto Gerola <roberto.gerola@speedtech.it>
0.8
Class Variable Summary |
$basePath
The base path for the locale files Default Value:
|
$defaultDomain
The default domain Default Value:
|
$defaultLanguage
The default language Default Value:
|
$dkeys
The array of domains keys Default Value:
|
$dvalues
The array of domains values Default Value:
|
$keys
The array of keys Default Value:
|
$values
The array of values Default Value:
|
Inherited Class Variable Summary | ||||||
Inherited From Class STPHPObject
|
Inherited Method Summary | ||||||||||
Inherited From Class STPHPObject
|
Method Summary |
STPHPLocale constructor STPHPLocale ( $name )
Creates the object |
string dgetText ( $value, [$domain = ''] )
Gets a translated text for the specified domain (using the default language) |
string dlgetText ( $value, [$domain = ''], [$language = ''] )
Gets a translated text for the specified domain and language |
void dtor ( )
Destructor |
string getBasePath ( )
Gets the base path for the localization files |
string getDefaultDomain ( )
Gets the default language |
string getDefaultLanguage ( )
Gets the default language |
string getText ( $value )
Gets a translated text (using the default domain and default language) |
string lgetText ( $value, [$language = ''] )
Gets a translated text for the specified language (using the default domain) |
void loadKeys ( [$fileKeys = ''] )
Loads the keys file |
void loadValues ( [$language = ''], [$fileValues = ''] )
Loads the values file |
void setBasePath ( $basePath )
Sets the base path for the localization files |
void setDefaultDomain ( $defaultDomain )
Sets the default domain |
void setDefaultLanguage ( $defaultLanguage )
Sets the default language |
Variable Detail |
private
private
private
private
private
private
private
Method Detail |
STPHPLocale constructor STPHPLocale ( $name )
Creates the object- string $name:
public
string dgetText ( $value, [$domain = ''] )
Gets a translated text for the specified domain (using the default language)- string $value: The value to translate
- string $domain: The domain to use
public
string dlgetText ( $value, [$domain = ''], [$language = ''] )
Gets a translated text for the specified domain and language- string $value: The value to translate
- string $domain: The domain to use
- string $language: The language to use
public
void dtor ( )
Overrides: STPHPObject::dtor()
DestructorDestroys all the resources associated with the object
public
string getBasePath ( )
Gets the base path for the localization filespublic
string getDefaultDomain ( )
Gets the default languagepublic
string getDefaultLanguage ( )
Gets the default languagepublic
string getText ( $value )
Gets a translated text (using the default domain and default language)- string $value: The value to translate
public
string lgetText ( $value, [$language = ''] )
Gets a translated text for the specified language (using the default domain)- string $value: The value to translate
- string $language: The language to use
public
void loadKeys ( [$fileKeys = ''] )
Loads the keys file- string $fileKeys: The keys file
public
void loadValues ( [$language = ''], [$fileValues = ''] )
Loads the values file- string $language: The languages values to load
- string $fileValues: The values file to load
public
void setBasePath ( $basePath )
Sets the base path for the localization files- string $localeBasePath: The base path
public
void setDefaultDomain ( $defaultDomain )
Sets the default domain- string $defaultDomain:
public
void setDefaultLanguage ( $defaultLanguage )
Sets the default language- string $defaultLanguage:
public