Australia has formally recognised West Jerusalem as Israel's capital, reversing decades of Middle East policy, in a move similar to the United States.