mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 23:25:20 +00:00
Add base localization infrastructure and externalize strings (#670)
* Add base localization infrastructure and externalize strings * Add Spanish localization scaffolding with translations * Add machine translations for expanded locales --------- Co-authored-by: jack <jackjackbits@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import Foundation
|
||||
|
||||
enum L10n {
|
||||
static func string(_ key: String, comment: String) -> String {
|
||||
NSLocalizedString(key, comment: comment)
|
||||
}
|
||||
|
||||
static func format(_ key: String, comment: String, _ args: CVarArg...) -> String {
|
||||
let format = NSLocalizedString(key, comment: comment)
|
||||
return String(format: format, locale: Locale.current, arguments: args)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user