开发者

Multilanguage URLs

开发者 https://www.devze.com 2022-12-19 18:15 出处:网络
In codeigniter, the name of your controller, reflects the URL. But my question is, how开发者_StackOverflow中文版 can you create multi language URLs without copy/pasting all your controllers.

In codeigniter, the name of your controller, reflects the URL. But my question is, how开发者_StackOverflow中文版 can you create multi language URLs without copy/pasting all your controllers.

Example:

  • In english the URL would be: http://www.example.com/order
  • In dutch the URL would be: http://www.example.com/bestellen ("bestellen" is dutch for "order")

Thanks


Take a look at URI routing in Code Igniter's user guide.


Usually a URL rewrite filter is used to handle this kind of behaviour.

I'm not familiar with CodeIgniter but a quick Google search shows this page about using mod rewrite in CodeIgniter.


You should be able to do it by creating aliases to each controller. Check your config/routes.php path

0

精彩评论

暂无评论...
验证码 换一张
取 消