Welcome Guest, Not a member yet? Register   Sign In
Poll: URI language identifier in core?
You do not have permission to vote in this poll.
yes
52.38%
22 52.38%
no
26.19%
11 26.19%
maybe
21.43%
9 21.43%
Total 42 vote(s) 100%
* You voted for this item. [Show Results]

Add URI Language Identifier to core?
#11

I understand your concerns. And I know there are many ways to handle multilingual.

What I am suggesting is CI can build this common way into the core. And it's of course optional. You can still choose your favorite way to handle the language.

Imagine Apple is going to build the web with CI and have this:
http://www.apple.com/hk/ipad/compare/
http://www.apple.com/sg/ipad/compare/
hk and sg as language. ipad as controller. compare as method.

And maybe Samsung:
http://www.samsung.com/hk/business/
http://www.samsung.com/sg/business/

HTC also:
http://www.htc.com/hk-tc/accessories/
http://www.htc.com/sea/accessories/

I'm not forcing anyone to use this method nor saying this method is better than yours.
I just want to say it's common. But there is no clear guide for implementing this common convention in my CI project.

As you can see this convention build something on the traditional "/controller/method" url which is something about core routing. That's why I would like this convention to be build into the core.

For example:

Blog controller has two methods: users, comments.

$route['blog/joe'] = 'blog/users/34';

http://sample.com/blog/comments (Redirect to default language maybe)
http://sample.com/hk/blog/comments
http://sample.com/sg/blog/comments
All are accessing the comments method in Blog controller.
And a helper function (or global variable or anything) let us know which language is it. Then we can load the correct language.

http://sample.com/blog/joe (Redirect to default language maybe)
http://sample.com/hk/blog/joe
http://sample.com/sg/blog/joe
All are accessing the users method with parameter 34 in Blog controller.
Reply


Messages In This Thread
RE: Add URI Language Identifier to core? - by kennytang.hk - 04-20-2015, 10:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB