diff options
Diffstat (limited to 'Sources/WireGuardApp/LocalizationHelper.swift')
-rw-r--r-- | Sources/WireGuardApp/LocalizationHelper.swift | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Sources/WireGuardApp/LocalizationHelper.swift b/Sources/WireGuardApp/LocalizationHelper.swift new file mode 100644 index 0000000..fcf13a9 --- /dev/null +++ b/Sources/WireGuardApp/LocalizationHelper.swift @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: MIT +// Copyright © 2018-2023 WireGuard LLC. All Rights Reserved. + +import Foundation + +func tr(_ key: String) -> String { + return NSLocalizedString(key, comment: "") +} + +func tr(format: String, _ arguments: CVarArg...) -> String { + return String(format: NSLocalizedString(format, comment: ""), arguments: arguments) +} |