TUIKit SwiftUI includes built-in language packs for English, Simplified Chinese, Traditional Chinese, and Arabic as default interface languages.English | Arabic | Simplified Chinese |
![]() | ![]() | ![]() |
TUIKit SwiftUI. No additional configuration is required. The component automatically matches the system language. If the system language is not one of the four supported languages, English is used by default.TUIKit SwiftUI, call setLanguage with the desired language code. Once set, the component will not follow the system language. Example:let languageState = LanguageState()// Supported languages:// "zh-Hans" - Simplified Chinese// "zh-Hant" - Traditional Chinese// "en" - English// "ar" - ArabiclanguageState.setLanguage("zh-Hans")
ko.lproj directory and a Localizable.strings file under ChatLocalizable.bundle/Localizable/. After adding Korean, the directory structure will look like this:Resources/strings/ChatLocalizable.bundle/Localizable/├── ar.lproj/Localizable.strings├── en.lproj/Localizable.strings├── zh-Hans.lproj/Localizable.strings└── zh-Hant.lproj/Localizable.strings└── ko.lproj/Localizable.strings // Korean translation file; "ko" is the ISO 639-1 language code for Korean
en.lproj/Localizable.strings and provide Korean translations for each entry.ko.lproj as well.ko.lproj/Localizable.strings, the keys are consistent across all language resource files. You can customize the translation content as needed.getSystemLanguage function within LanguageState.swift.private static func getSystemLanguage() -> String {let preferredLanguage = Locale.preferredLanguages.first ?? "en"if preferredLanguage.hasPrefix("en") {return "en"} else if preferredLanguage.hasPrefix("zh") {if preferredLanguage.contains("Hans") {return "zh-Hans"} else {return "zh-Hant"}} else if preferredLanguage.hasPrefix("ar") {return "ar"} else if preferredLanguage.hasPrefix("ko") {return "ko" // Add this branch to support Korean system language} else {return "en"}}
TUIKit SwiftUI interface to Korean, call setLanguage with the appropriate language code. Once set, the component will not follow the system language. Example:let languageState = LanguageState()// Supported languages:// "zh-Hans" - Simplified Chinese// "zh-Hant" - Traditional Chinese// "en" - English// "ar" - ArabiclanguageState.setLanguage("zh-Hans")

Language | Code | Language | Code |
Arabic | ar | Bulgarian | bg |
Croatian | hr | Czech | cs |
Danish | da | German | de |
Greek | el | English | en |
Estonian | et | Spanish | es |
Finnish | fi | French | fr |
Irish | ga | Hindi | hi |
Hungarian | hu | Hebrew | he |
Italian | it | Japanese | ja |
Korean | ko | Latvian | lv |
Lithuanian | lt | Dutch | nl |
Norwegian | no | Polish | pl |
Portuguese | pt | Swedish | sv |
Romanian | ro | Russian | ru |
Serbian | sr | Slovak | sk |
Slovenian | sl | Thai | th |
Turkish | tr | Ukrainian | uk |
Chinese (Simplified) | zh-Hans | Chinese (Traditional) | zh-Hant |
피드백