views:

68

answers:

0

I am setting language depending on the domain name (en for en.example.com, tr for tr.example.com):

resources.router.routes.plain.type = "Zend_Controller_Router_Route"
resources.router.routes.plain.route = "/:module/:controller/:action"
resources.router.routes.plain.defaults.language= "en"
resources.router.routes.plain.defaults.module = "content"
resources.router.routes.plain.defaults.controller = "index"
resources.router.routes.plain.defaults.action = "index"

resources.router.routes.plain1.type = "Zend_Controller_Router_Route"
resources.router.routes.plain1.abstract = 1
resources.router.routes.plain1.route = "/:module/:controller/:action/*"
resources.router.routes.plain.defaults.module = "content"
resources.router.routes.plain.defaults.controller = "index"
resources.router.routes.plain.defaults.action = "index"

resources.router.routes.dom0.type = "Zend_Controller_Router_Route_Hostname"
resources.router.routes.dom0.abstract = 1
resources.router.routes.dom0.route = "en.example.com"
resources.router.routes.dom0.defaults.language= "en"
resources.router.routes.chn1.type = Zend_Controller_Router_Route_Chain
resources.router.routes.chn1.chain = "dom0, plain1"

resources.router.routes.dom1.type = "Zend_Controller_Router_Route_Hostname"
resources.router.routes.dom1.abstract = 1
resources.router.routes.dom1.route = "tr.example.com"
resources.router.routes.dom1.defaults.language= "tr"
resources.router.routes.chn2.type = Zend_Controller_Router_Route_Chain
resources.router.routes.chn2.chain = "dom1, plain1"

the problem here is when I call url only with modulename and without specifying controller or action: tr.example.com/content/ I get the language set to "en"

But when I call with modulename, controller and action: tr.example.com/content/article/read everything is fine

What do I do wrong?

Thanks in advance