Facebook apologized on Saturday after its platform translated Xi Jinping, the name of the Chinese leader, from Burmese to a vulgar word in English.

The mistranslation caught the company’s attention when Daw Aung San Suu Kyi, the de facto civilian leader of Myanmar, wrote on her official Facebook page about Mr. Xi’s two-day visit to her country.

When the Burmese posts were translated into English on Facebook, Mr. Xi’s name repeatedly appeared as “Mr. Shithole.”

It was not clear how long the issue lasted, but Google’s translation function did not show the same error, Reuters reported.