Piwik\Plugins\LanguagesManager\LanguagesManager::jsGlobalVariables PHP Method

jsGlobalVariables() public method

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 )
    public function jsGlobalVariables(&$str)
    {
        // piwik object & scripts aren't loaded in 'other' topbars
        $str .= "piwik.languageName = '" . self::getLanguageNameForCurrentUser() . "';";
    }