学ぶ
エンジンクラス
Translator
作成できません
複製されていません

*このコンテンツは、ベータ版のAI(人工知能)を使用して翻訳されており、エラーが含まれている可能性があります。このページを英語で表示するには、 こちら をクリックしてください。


概要
プロパティ
方法
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, "Screen")
print(trans)
else
warn("プレイヤーの翻訳者を読み込めません!")
end

©2026 Roblox Corporation。Roblox(ロブロックス)、RobloxロゴおよびPowering Imaginationは、米国並びにその他の国における登録商標および非登録商標です。