url() not providing links to correct language alias using i18n in D7 We have a site that features two languages, EN (primary/default) and JA.  On one content page, we link to another node using it's nid: url('node/123').  In EN, this returns the alias and not the node based url.  When in the JA language, this returns a url like /ja/node/123 which then shows text in the EN variant when we expect JA.  There are aliases set for both EN and JA, which both point to the same desired URL like: /products/new-fancy-product and their respective node id urls.  In EN, url returns this alias correctly.

Also, if I change /products/new-fancy-product to /ja/products/new-fancy-product in the address bar, I get the correct JA version of the page as I want.

Why is url not returning me the correct alias instead of the node id path, which then just shows EN content?
Use l() function to generate a link. 


  Formats an internal or external URL link as an HTML anchor tag.
  
  This function correctly handles aliased paths and adds an 'active'
  class attribute to links that point to the current page (for theming),
  so all internal links output by modules should be generated by this
  function if possible.