Welcome Guest, Not a member yet? Register   Sign In
Change default language depending domain name
#3

[eluser]PhilTem[/eluser]
Put something like this into APPPATH . 'config/autoload.php'

Code:
$autoload['language'] = array($_SERVER['HTTP_HOST'] ? : $_SERVER['SERVER_NAME'])

which will load files
example.com_lang.php on example.com (or maybe www.example.com_lang.php on example.com and www.example.com respectively)
and
example.de_lang.php on example.de

You need to play with the argument $_SERVER['HTTP_HOST'] and maybe trim some parts from it or change the string somehow so that it is uniquely identified for both http://www.example.com and http://example.com (as well as maybe https://...)

But this should guide you towards one solution.


Messages In This Thread
Change default language depending domain name - by El Forum - 11-19-2012, 08:47 AM
Change default language depending domain name - by El Forum - 11-19-2012, 03:57 PM
Change default language depending domain name - by El Forum - 11-19-2012, 04:28 PM
Change default language depending domain name - by El Forum - 11-19-2012, 05:22 PM



Theme © iAndrew 2016 - Forum software by © MyBB