Admidio API
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Packages

  • com
    • tecnick
      • tcpdf
  • None
  • PHPMailer
    • easypeasyics
  • PHPWavUtils
  • Securimage
    • classes

Classes

  • AutoLogin
  • Component
  • ComponentUpdate
  • ConditionParser
  • Database
  • DateTimeExtended
  • Email
  • Folder
  • FormValidation
  • FunctionClass
  • Htaccess
  • HtmlDiv
  • HtmlElement
  • HtmlForm
  • HtmlFormBasic
  • HtmlFormInstallation
  • HtmlList
  • HtmlNavbar
  • HtmlPage
  • HtmlTable
  • HtmlTableBasic
  • Image
  • Inventory
  • InventoryFields
  • Language
  • LanguageData
  • ListConfiguration
  • Menu
  • Message
  • ModuleAnnouncements
  • ModuleDates
  • ModuleLists
  • ModuleMenu
  • ModuleMessages
  • Modules
  • ModuleWeblinks
  • MyFiles
  • Navigation
  • ntlm_sasl_client_class
  • Organization
  • Participants
  • PasswordHash
  • PasswordHashing
  • ProfileFields
  • RoleDependency
  • RolesRights
  • RSSfeed
  • Session
  • SystemMail
  • TableAccess
  • TableAnnouncement
  • TableCategory
  • TableDate
  • TableFile
  • TableFolder
  • TableGuestbook
  • TableGuestbookComment
  • TableInventory
  • TableInventoryField
  • TableLists
  • TableMembers
  • TableMessage
  • TablePhotos
  • TableRoles
  • TableRooms
  • TableText
  • TableUserField
  • TableUsers
  • TableWeblink
  • UploadHandlerDownload
  • UploadHandlerPhoto
  • User
  • UserRegistration

Exceptions

  • AdmException
  • WavFileException
  • WavFormatException

Functions

  • admFuncAutoload
  • admFuncGeneratePagination
  • admFuncGetBytesFromSize
  • admFuncGetDirectoryEntries
  • admFuncMaxUploadSize
  • admFuncProcessableImageSize
  • admFuncShowCreateChangeInfoById
  • admFuncShowCreateChangeInfoByName
  • admFuncVariableIsValid
  • admReadTemplateFile
  • admStrIsValidFileName
  • admStrStripTagsSpecial
  • admStrToLower
  • admStrToUpper
  • bzip2Version
  • checkDatabaseVersion
  • checkPhpVersion
  • EmailAttachment
  • FileSizeNiceDisplay
  • FormattedTimeRemaining
  • FunctionIsDisabled
  • getFormerRolesFromDatabase
  • getFutureRolesFromDatabase
  • getmicrotime
  • getRoleMemberships
  • getRolesFromDatabase
  • gzipVersion
  • hasRole
  • hl_attrval
  • hl_bal
  • hl_cmtcd
  • hl_ent
  • hl_prot
  • hl_regex
  • hl_spec
  • hl_tag
  • hl_tag2
  • hl_tidy
  • hl_version
  • htmLawed
  • HTMLFilter
  • isGroupLeader
  • isMember
  • kses
  • kses_hook
  • MySQLdumpVersion
  • OutputInformation
  • SafeExec
  • showNotice
  • strAddSlashesDeep
  • strNextLetter
  • strStripSlashesDeep
  • strStripTags
  • strValidCharacters
  • tln_body2div
  • tln_casenormalize
  • tln_deent
  • tln_defang
  • tln_findnxreg
  • tln_findnxstr
  • tln_fixatts
  • tln_fixstyle
  • tln_fixurl
  • tln_getnxtag
  • tln_sanitize
  • tln_skipspace
  • tln_tagprint
  • tln_unspace
  • version_compare_replacement
  • version_compare_replacement_sub

Class LanguageData

Copyright: 2004-2016 The Admidio Team
License: GNU General Public License v2.0 only **********************************************************************************************
Brief:

Stores language data in a class object

This class stores data of the Language object. These are the paths to all relevant language files, the configured language and the default language. This object is designed to be stored in a PHP session. The Language object itself couldn't be stored in a Session because it uses PHP objects which couldn't stored in a PHP session.


Class: LanguageData
Code:

// show how to use this class with the language class and sessions script_a.php // create a language data object and assign it to the language object $language = new Language(); $languageData = new LanguageData('de'); $language->addLanguageData($languageData); $session->addObject('languageData', $languageData);

script_b.php // read language data from session and add it to language object $language = new Language(); $language->addLanguageData($session->getObject('languageData')); @endcode


Par: Examples
Located at languagedata.php

Methods summary

public
# __construct( string $language, string $languagePath = '' )

Creates an object that stores all necessary language data and can be handled in session. Therefore the language must be set and optional a path where the language files are stored.

Creates an object that stores all necessary language data and can be handled in session. Therefore the language must be set and optional a path where the language files are stored.

Parameters

$language
The ISO code of the language for which the texts should be read e.g. @b 'de'
$languagePath

Optional a server path to the language files. If no path is set than the default Admidio language path @b adm_program/languages will be set.

public
# addLanguagePath( string $path )

Adds a new path of language files to the array with all language paths where Admidio should search for language files.

Adds a new path of language files to the array with all language paths where Admidio should search for language files.

Parameters

$path
Server path where Admidio should search for language files.
public string[]
# getCountriesArray( )

Returns an array with all countries and their ISO codes

Returns an array with all countries and their ISO codes

Returns

string[]
Array with all countries and their ISO codes e.g.: array('DEU' => 'Germany' ...)
public string
# getLanguage( boolean $referenceLanguage = false )

Returns the language code of the language of this object. This is the code that is set within Admidio with some specials like de_sie. If you only want the ISO code then call getLanguageIsoCode().

Returns the language code of the language of this object. This is the code that is set within Admidio with some specials like de_sie. If you only want the ISO code then call getLanguageIsoCode().

Parameters

$referenceLanguage
If set to @b true than the language code of the reference language will returned.

Returns

string
Returns the language code of the language of this object or the reference language.
public string[]
# getLanguagePaths( )

Returns an array with all language paths that were set.

Returns an array with all language paths that were set.

Returns

string[]
with all language paths that were set.
public
# setCountriesArray( array $countries )

Save the array with all countries and their ISO codes in an internal parameter for later use

Save the array with all countries and their ISO codes in an internal parameter for later use

Parameters

$countries
Array with all countries and their ISO codes e.g.: array('DEU' => 'Germany' ...)
public
# setLanguage( string $language )

Set a language to this object. If there was a language before than initialize the cache

Set a language to this object. If there was a language before than initialize the cache

Parameters

$language
ISO code of the language that should be set to this object.

Properties summary

public array $textCache
# array()
private array $languageFilePath
# array()
private $language
#
private string $referenceLanguage
# 'en'
private array $countries
# array()
Admidio API API documentation generated by ApiGen