Package DE_EPAGES::Object::API::Language
interface for conversion between ISO-639 language codes and internal language ids. This is necessary, because multiple language codes map to the same language.
@EXPORT_OK |
Functions
ExistsLanguageByCode
Returns true if the language with the specified language code exists in the database.
Syntax |
$Exists = ExistsLanguageByCode( $LanguageCode ); if( ExistsLanguageByCode( 'fi' ) ) { ... } |
Input |
|
Return |
|
GetCodeByLanguageID
Returns the ISO-639 language code by the LanguageID. Returns the 2-letter code if it exists, otherwise returns the 3-letter code.
Syntax |
$Code = GetCodeByLanguageID( $LanguageID ); |
Example |
$Code = GetCodeByLanguageID( 1 ); |
Input |
|
Return |
|
GetCurrentLanguageID
Returns the current internal language id of the process.
Syntax |
$LanguageID = GetCurrentLanguageID(); |
Return |
|
GetPKeyLanguageByCode
Returns the language id by ISO-639 language code. The code can be a 2-letter or 3-letter code.
Syntax |
$LanguageID = GetPKeyLanguageByCode( $LanguageCode ); |
Example |
$LanguageID = GetPKeyLanguageByCode( 'enu' ); $LanguageID = GetPKeyLanguageByCode( 'it' ); |
Input |
|
Return |
|