How to get the list of languages provided by a plugin

I have to use this PHP function to get the list of files contained in the language directory of the plugin :

scandir($plg_dir."/language");

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)