daily pastebin goal
4%
SHARE
TWEET

Untitled

a guest Jul 12th, 2018 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if (!function_exists('select_language')) {
  2.     function select_language($lang = FALSE, $langs_array = FALSE)
  3.     {
  4.         if (empty($lang) || empty($langs_array)) {
  5.             throw_on_404();
  6.         }
  7.  
  8.         $CI = &get_instance();
  9.         $protocol = (isset($_SERVER['HTTPS']) ? "https" : "http");
  10.         $host = '://' . $_SERVER['HTTP_HOST'];
  11.         $get_data = $_SERVER['QUERY_STRING'];
  12.  
  13.         $current_lang = strtolower($lang);
  14.  
  15.         unset($langs_array[$current_lang]);
  16.  
  17.         $CI->load->view('layouts/pages/langs', array('langs_array' => $langs_array, 'protocol' => $protocol, 'host' => $host, 'get_data' => $get_data));
  18.     }
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top