I don't have to tell you that 2.5 is not so good. There are also not
many router changes in 3.4. However, there are several changes here
https://github.com/joomla/joomla-cms/pull/5140 that should allow you to
use the languagefilter plugin from Joomla with your multi-domain site.
You can simply move your multi-domain plugin before the languagefilter
plugin.
If that still does not work for you, take a look at the end of the
parse() method in that PR how I change the language there. That is the
only way that that is possible. However, if you do that in the template,
you will fail. You have to do that VERY early in the process, either in
onAfterInitialise or onAfterRoute or during routing with a routing rule
like the language filter plugin. Otherwise all language strings in
plugins and the component will already be loaded and translated in the
wrong language and they will be lost after the new language has been
created.
JLanguage::setLanguage() does not work.
Hannes