/ Published in: PHP

You can use this in Joomla extensions where you need to get the current language locale for example to use with Facebook Connect/Like plugins etc. in the "en_US" format. With facebooj JS, all you have to do is replace the default locale with the resulting variable something like this:
e.src = document.location.protocol +'//connect.facebook.net//all.js';
e.src = document.location.protocol +'//connect.facebook.net//all.js';
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$lang =& JFactory::getLanguage(); $locales = $lang->getLocale();
Comments
