HTML แปลแอตทริบิวต์
ตัวอย่าง
ระบุว่าองค์ประกอบบางอย่างไม่ควรแปล:
<p translate="no">Don't translate this!</p>
<p>This can be translated to any language.</p>
ความหมายและการใช้งาน
แอตทริบิวต์translate
ระบุว่าเนื้อหาขององค์ประกอบควรได้รับการแปลหรือไม่
ทดสอบ: คลิกที่ Google แปลรูปภาพ (ถัดจากปุ่มค้นหาที่ด้านบนของหน้า) เพื่อเปลี่ยนเป็นภาษาอื่น และดูว่าเกิดอะไรขึ้นกับคำว่า "ไอศกรีม" ด้านล่าง:
ที่นี่เราใช้ translate="no":ice cream.
รองรับเบราว์เซอร์
Attribute | |||||
---|---|---|---|---|---|
translate | Not supported | Not supported | Not supported | Not supported | Not supported |
ไวยากรณ์
<element translate="yes|no">
ค่าแอตทริบิวต์
Value | Description |
---|---|
yes | Specifies that the content of the element should be translated |
no | Specifies that the content of the element must not be translated |
หน้าที่เกี่ยวข้อง
บทช่วยสอน HTML: แอตทริบิวต์ HTML