I'm building an international site and am running into trouble with the language detection. I need to have urls structured like the below examples for SEO purposes, but nothing I've found will allow for that. I wrote a little module that hooked into pathauto to prepend the code to the alias, but it didn't seem to be recognized... I'm using Organic Groups and Domain Access to manage the multiple countries, and Entity Translation and i18n for the languages. I also have Global Redirect in place to help keep out duplicate content links. One requirement is that for some countries the default language should not be prefixed at all.
Has anybody had experience with urls like this? It seems like it should be possible without hacking into the core...
Country | Language | URL
Austria | German | www.domain.com/at
Belgium | Dutch | www.domain.com/nl-be
Belgium | French | www.domain.com/fr-be
Canada | English | www.domain.com/en-ca
Canada | French | www.domain.com/fr-ca
Global | English | global.domain.com/en
Global | French | global.domain.com/fr