Immigration Act Article 38-6

The subject shall be notified in writing of the temporary detention order, alternative sanction to detention and deportation. Using the subject’s familiar language, the National Immigration Agency must also provide the reasons for the decision, the methods or ways to remedy, the duration of detention, relevant authorities, and other related regulations. The embassy or consulate in the State of the subject’s country of origin, shall also be notified of the detention decision no later than twenty-four (24) hours.
中文原文 入出國及移民法第38-6條
移民署為暫予收容處分、收容替代處分及強制驅逐出國處分時,應以受處分人理解之語文作成書面通知,附記處分理由及不服處分提起救濟之方法、期間、受理機關等相關規定;並應聯繫當事人原籍國駐華使領館、授權機構或通知其在臺指定之親友,至遲不得逾二十四小時。

English translation for reference only; the Chinese text prevails. Not legal advice.