PHP Class Piwik\Plugins\LanguagesManager\LanguagesManager

Inheritance: extends Piwik\Plugin
Afficher le fichier Open project: piwik/piwik Class Usage Examples

Méthodes publiques

Méthode Description
addLanguagesManagerToOtherTopBar ( &$str ) Adds the languages drop-down list to topbars other than the main one rendered in CoreHome/templates/top_bar.twig. The 'other' topbars are on the Installation and CoreUpdater screens.
deleteUserLanguage ( $userLogin )
getJsFiles ( &$jsFiles )
getLanguageCodeForCurrentUser ( ) : string
getLanguageForSession ( ) : string | null Returns the language for the session
getLanguageNameForCurrentUser ( ) : string
getLanguagesSelector ( ) : string Renders and returns the language selector HTML.
initLanguage ( )
install ( )
jsGlobalVariables ( &$str ) Adds the languages drop-down list to topbars other than the main one rendered in CoreHome/templates/top_bar.twig. The 'other' topbars are on the Installation and CoreUpdater screens.
registerEvents ( )
setLanguageForSession ( string $languageCode ) : boolean Set the language for the session
uninstall ( )
uses12HourClockForCurrentUser ( ) : boolean

Méthodes protégées

Méthode Description
getLanguageFromPreferences ( ) : string | false

Method Details

addLanguagesManagerToOtherTopBar() public méthode

Adds the languages drop-down list to topbars other than the main one rendered in CoreHome/templates/top_bar.twig. The 'other' topbars are on the Installation and CoreUpdater screens.

deleteUserLanguage() public méthode

public deleteUserLanguage ( $userLogin )

getJsFiles() public méthode

public getJsFiles ( &$jsFiles )

getLanguageCodeForCurrentUser() public static méthode

public static getLanguageCodeForCurrentUser ( ) : string
Résultat string Two letters language code, eg. "fr"

getLanguageForSession() public static méthode

Returns the language for the session
public static getLanguageForSession ( ) : string | null
Résultat string | null

getLanguageFromPreferences() protected static méthode

protected static getLanguageFromPreferences ( ) : string | false
Résultat string | false if language preference could not be loaded

getLanguageNameForCurrentUser() public static méthode

public static getLanguageNameForCurrentUser ( ) : string
Résultat string Full english language string, eg. "French"

getLanguagesSelector() public méthode

Renders and returns the language selector HTML.
public getLanguagesSelector ( ) : string
Résultat string

initLanguage() public méthode

public initLanguage ( )

install() public méthode

public install ( )

jsGlobalVariables() public méthode

Adds the languages drop-down list to topbars other than the main one rendered in CoreHome/templates/top_bar.twig. The 'other' topbars are on the Installation and CoreUpdater screens.
public jsGlobalVariables ( &$str )

registerEvents() public méthode

See also: Piwik\Plugin::registerEvents
public registerEvents ( )

setLanguageForSession() public static méthode

Set the language for the session
public static setLanguageForSession ( string $languageCode ) : boolean
$languageCode string ISO language code
Résultat boolean

uninstall() public méthode

public uninstall ( )

uses12HourClockForCurrentUser() public static méthode

public static uses12HourClockForCurrentUser ( ) : boolean
Résultat boolean