![]() |
Multilanguage support? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Multilanguage support? (/showthread.php?tid=42186) Pages:
1
2
|
Multilanguage support? - El Forum - 06-02-2011 [eluser]web-johnny[/eluser] [quote author="Y0shi" date="1307002731"]Thanks a lot ![]() I allow my clients to set their routes manually. For example article/showarticle/1 gets lorem-ipsum-is-great as SEO route. So that means surfing to domain.tld/lorem-ipsum-is-great will bring the article with id = 1 up. The same goes for forms (e.g. domain.tld/contact) and other stuff. I need a method to make sure, that only the routes which are in the current language enviroment (de, en etc.) are loaded. Currently I load my routes dynamicly via a hook. But neither in the hook nor in the config files a constant will be echoed correctly... because it isn't set of course. So what can I do? I also got this in my routes: // General Language Rerouting $route['(\w{2})/(.*)'] = '$2'; $route['(\w{2})'] = $route['default_controller']; which is from the URI library. I think this will override anything if im trying to include the language abbreviation in my dynamically set routes. For example route['lorem-ipsum-is-great'] would then be route['en/lorem-ipsum-is-great'] and in German route['de/lorem-ipsum-ist-superklasse']... Any thoughts? Best regards ![]() Code: function welcome($url_title) |