Query to get languages Installed

Query to get languages Installed

von Edgar Conrado Hernandez -
Anzahl Antworten: 4

Hello 


I am looking for a query for MySql to get languages installed in Moodle, any advice?

Moodle Version 2.7


Regards

Als Antwort auf Edgar Conrado Hernandez

Re: Query to get languages Installed

von Richard Oelmann -
Nutzerbild von Core developers Nutzerbild von Particularly helpful Moodlers Nutzerbild von Plugin developers Nutzerbild von Testers

Why use an SQL? You'll still need to upload the language files themselves.

There's a perfectly good tool in the front end for adding language packs to your moodle site

Als Antwort auf Edgar Conrado Hernandez

Re: Query to get languages Installed

von Michael Milette -
Nutzerbild von Core developers Nutzerbild von Documentation writers Nutzerbild von Particularly helpful Moodlers Nutzerbild von Plugin developers Nutzerbild von Testers Nutzerbild von Translators

Hi Edgar,

You don't need to use MySQL for this. Moodle has an API specifically for this purpose.

     $langs = get_string_manager()->get_list_of_translations();

You'll find an example of this in the lang_menu() function found in moodle/lib/outputrenderers.php file.

Best regards,

     Michael Milette