Xcode String Catalog

前言

還記得之前寫了一篇 Unreal 使用 iOS 的多語系嗎?

Unreal 如何支援 iOS 多語系
讓 Unreal 支援 iOS 的 NSLocalizedString

之前就一直覺得 iOS 製作多語系好麻煩,要按好多按鈕以及每一個語言都要切到對應的檔案,雖然 Android 也是這樣,但不知道在哪一版的 Android Studio 就有針對這樣的痛點做編輯器改善。

Android Studio Translations Editor

String Catalog

Xcode15 String Catalog

今天用 Xcode 15 來製作新 Side Project 時,原先要新增 .strings file 來製作多語系,才發現已經有新的格式出來。

副檔名從 .strings -> .xcstrings

不過這一次的多語系檔案,並非是跟 Android Studio 一樣可以在一個畫面瀏覽完全部語系,而是只有英文與選定語系的對照。

但增加的是可以針對不同平台設定文字,以符合該平台的操作習慣

參考資料

Discover String Catalogs - WWDC23 - Videos - Apple Developer
Discover how Xcode 15 makes it easy to localize your app by managing all of your strings in one place. We’ll show you how to extract,…

WWDC 2023 String Catalogs