Apparently the urlAlias() method does not take into account the language you fetched the node in. It completely relies on eZURLAliasML, which on its turn relies on eZContentLanguage and the prioritized language list as defined for your site access.

Although I did not try this, I think you can modify the prioritized language list, get the URL alias you want, and then restore the prioritized language list to its original value. Some code that might get you started:

What I want to do is have the same URLs in all the different languages, basically turn off multilanguage URL aliases, or (to put it another way) force all siteaccesses to show the URL aliases for the main language. Do I have to write a custom method like the above or is there an easier way, like a setting somewhere, that will do this? Thanks!

Apparently the urlAlias() method does not take into account the language you fetched the node in. It completely relies on eZURLAliasML, which on its turn relies on eZContentLanguage and the prioritized language list as defined for your site access.

Although I did not try this, I think you can modify the prioritized language list, get the URL alias you want, and then restore the prioritized language list to its original value. Some code that might get you started: