เรียนรู้
Engine Class
Translator
ไม่สามารถสร้าง
ไม่ซ้ำ

*เนื้อหานี้แปลโดยใช้ AI (เวอร์ชัน Beta) และอาจมีข้อผิดพลาด หากต้องการดูหน้านี้เป็นภาษาอังกฤษ ให้คลิกที่นี่


สรุป
คุณสมบัติ
วิธีการ
FormatByKey(key: string,args: Variant):string
สมาชิกที่ได้รับทอด

เอกสารอ้างอิงเกี่ยวกับ API
คุณสมบัติ
LocaleId
อ่านอย่างเดียว
ไม่ซ้ำ
อ่านพร้อมๆ กัน
ความสามารถ: Basic
Translator.LocaleId:string

วิธีการ
FormatByKey
ความสามารถ: Basic
Translator:FormatByKey(
key:string, args:Variant
พารามิเตอร์
key:string
args:Variant
ส่งค่ากลับ

Translate
ความสามารถ: Basic
Translator:Translate(
context:Instance, text:string
พารามิเตอร์
context:Instance
text:string
ส่งค่ากลับ
ตัวอย่างโค้ด
แปล
local Players = game:GetService("Players")
local LocalizationService = game:GetService("LocalizationService")
local success, translator = pcall(function()
return LocalizationService:GetTranslatorForPlayerAsync(Players.LocalPlayer)
end)
if success then
local trans = translator:Translate(workspace.ComputerScreen.SurfaceGui.TextLabel, "หน้าจอ")
print(trans)
else
warn("ไม่สามารถโหลดตัวแปลสำหรับผู้เล่น!")
end

©2026 Roblox Corporation. Roblox, โลโก้ Roblox และ Powering Imagination เป็นส่วนหนึ่งของเครื่องหมายการค้าที่จดทะเบียน และไม่ได้จดทะเบียนของเราในสหรัฐฯ และประเทศอื่นๆ