Welcome Guest, Not a member yet? Register   Sign In
language detection by subdomain
#1

[eluser]miguelp[/eluser]
Hi, i'm having a hard time doing a language selection using the subdomain.

what i wanna do is simple, imagine that the default language for a website or app is english "en", if the user hit www.mysite.com it loads the default.

Now what i wanna do is if the user click on the portuguese language link it will be redirect to http://pt.mysite.com, or if the language is german it get redirected to http://de.mysite.com, this part is easy, my problem is using the installation of CI on the root, how do i detect the subdomain so i can load the apropriate language content from the database?

what i wanna have is something like:
default: mysite.com
other languages: language.mysite.com

But allways use the main CI installation from the domain root.

Can anyone help me out here?

Thanks in advance


Messages In This Thread
language detection by subdomain - by El Forum - 05-23-2008, 09:38 AM
language detection by subdomain - by El Forum - 05-23-2008, 03:50 PM
language detection by subdomain - by El Forum - 05-24-2008, 04:17 AM



Theme © iAndrew 2016 - Forum software by © MyBB