Facebook has apologised after the site translated Chinese leader Xi Jinping's name to 'Mr S***hole'.

The posts on the social media platform had been translated from Burmese into English as President Xi Jinping continued his state visit in Myanmar, Southeast Asia.

Facebook Inc has since apologised for any offence caused and said that the problem has now been fixed.

The error came to light on the second day of President Xi Jinping's state visit during which he and state counsellor Aung San Suu Kyi (pictured together) signed dozens of agreements covering massive Beijing-backed infrastructure plans

A Burmese to English translation, which Facebook states was a technical error, of a Facebook post by Myanmar State Counsellar Office about a visit by China's President Xi Jinping in Myanmar

The error came to light on the second day of the Chinese leader's visit during which he and state counsellor Aung San Suu Kyi signed dozens of agreements covering massive Beijing-backed infrastructure plans.

A statement about the visit published on Suu Kyi's official Facebook page was littered with references to 'Mr S***hole' when translated to English.

A headline in local news journal, the Irrawaddy, also read: 'Dinner honors President S***hole.'

It was not clear how long the issue had lasted but Google's translation function did not show the same error.

A statement about the visit of Xi Jinping to Myanmar published on Aung San Suu Kyi's official Facebook page was littered with references to 'Mr S***hole' when translated to English

Facebook Inc has since apologised for any offence caused by the translation of 'Mr S***hole' and said that the problem has now been fixed. Pictured: President Xi Jinping at a bilateral meeting

It was not clear how long the issue had lasted but Google's translation function did not show the same error. Pictured: Chinese President Xi Jinping (centre) alongside Myanmar's President Win Myint (right)

In a statement, a spokesperson for Facebook said: 'We have fixed an issue regarding Burmese to English translations on Facebook and are working to identify the cause to ensure that it doesn't happen again.

'This issue is not a reflection of the way our products should work and we sincerely apologise for the offence this has caused.'

Facebook has faced numerous problems with translation from Burmese in the past.

Facebook has faced numerous problems with translation from Burmese in the past. Pictured: Myanmar's army chief, Senior General Min Aung Hlaing (left) speaking with the Chinese leader (right)

In 2018 it temporarily removed the function after a report showed the tool was producing bizarre results.

An investigation later documented how the company was failing in its efforts to combat vitriolic Burmese language posts about Myanmar's Rohingya Muslims - around 730,000 of whom fled a military crackdown in 2017 that the U.N. has said was conducted with 'genocidal intent'.

China is Facebook's biggest country for revenue after the United States and the tech company is setting up a new engineering team to focus specifically on the lucrative advertising business there.