Get list of available languages - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11) +--- Thread: Get list of available languages (/showthread.php?tid=79697) |
Get list of available languages - Ryubal - 07-21-2021 Hello guys, quick question. Is there a built-in way to get a list of languages available? Or do I have to go the manual route, by scanning folder names in app/Language? I'd like to provide a logged-in user with the languages available, so he can choose whichever he wants. RE: Get list of available languages - InsiteFX - 07-21-2021 We usally add the languages that were going to use, you could create your own array and add the languages to it. Updated 07-27-2021 Added helper method. PHP Code: /** This method willl return to you an array of all languages in the app/Language folder. |