發表文章

目前顯示的是 12月, 2020的文章

UE4 多國語言實作 (Localization)

圖片
 建立文本庫 (String Table) New Asset > Miscellaneous > String Table 新增欲翻譯之文本內容 啟用工具-Localization Dashboard Editor Preferences > Gemeral > Experimental > Tools > Localization Dashboard 開啟Localization Dashboard Window > Localization Dashboard 指定欲翻譯的文本 (Gather Text) 勾選 Gather from Packages 在Include Path Wildcards指定String Table存放的路徑 設定目標語言 (Cultures) 新增目標語言 Add New Culture - English 確認Culture - Chinese設定為Native 收集欲翻譯的文本內容 Gather Text 手動翻譯文本 針對Culture - English進行翻譯 (Edit translations for this culture) Count Words確認內容數量 編譯文本 Compile Text (文本從Untranslated轉移至Completed) Note: 文本內容 (en - Game - Translation Editor)需關閉視窗再打開內容才會更新 實作 在WidgetBlueprint新增Text元件,在Content.Text進階設定(向下箭頭)選擇String Table及指定的Key,即可呈現具有在地化功能的文字 或在Blueprint裡透過類型為Text的變數來進階指定具在地化功能的文字 驗證 Editor Preferences > General > Region & Language > Internationalization > Preview Game Language = English 在Standalone Game模式下運行測試 Note: 在非Standalone Game模式下,有些內容會無法正確在地化 Chinese English