CI ecommerce |
[eluser]tomcode[/eluser]
I use URL's and session, session's only for convenience, in case of someone coming back. I do : 1. have URL's set up : http://example.com/lang/controller/method where lang is a two letter token (ISO 639.1 notation, en, fr, de) the routes : Code: // one set for every controller 2. I rename my languages accordingly : english -> en french -> fr ... etc. 3. I organize my templates under the view folder accordingly, a template folder for common views with subfolders for each language 4. If the site's index is called without a language token : a. I look for a session language b. then I look for a browser language c. If I can't have a match with the site's language I use the site's default language d. I set the language in the session and redirect to the found language The code in MY_Controller : Code: class MY_Controller extends Controller { The MY_User_agent.php Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); Edit : Forgot, have a config item, too : Code: /* |
Messages In This Thread |
CI ecommerce - by El Forum - 02-03-2010, 03:35 PM
CI ecommerce - by El Forum - 02-03-2010, 03:56 PM
CI ecommerce - by El Forum - 02-03-2010, 04:55 PM
CI ecommerce - by El Forum - 02-04-2010, 12:26 AM
CI ecommerce - by El Forum - 02-04-2010, 01:04 AM
CI ecommerce - by El Forum - 02-04-2010, 02:38 AM
CI ecommerce - by El Forum - 02-04-2010, 03:58 AM
CI ecommerce - by El Forum - 02-04-2010, 12:06 PM
CI ecommerce - by El Forum - 02-18-2010, 09:39 AM
CI ecommerce - by El Forum - 02-22-2010, 01:40 PM
CI ecommerce - by El Forum - 03-15-2010, 07:10 AM
CI ecommerce - by El Forum - 03-15-2010, 07:47 AM
CI ecommerce - by El Forum - 03-16-2010, 05:37 AM
CI ecommerce - by El Forum - 03-16-2010, 05:42 AM
CI ecommerce - by El Forum - 03-16-2010, 05:48 AM
CI ecommerce - by El Forum - 03-16-2010, 05:57 AM
CI ecommerce - by El Forum - 03-16-2010, 06:50 AM
CI ecommerce - by El Forum - 03-16-2010, 07:09 AM
CI ecommerce - by El Forum - 03-16-2010, 07:27 AM
CI ecommerce - by El Forum - 03-16-2010, 05:16 PM
CI ecommerce - by El Forum - 03-16-2010, 05:19 PM
|