aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/WireGuard/LocalizationHelper.swift
diff options
context:
space:
mode:
Diffstat (limited to 'WireGuard/WireGuard/LocalizationHelper.swift')
-rw-r--r--WireGuard/WireGuard/LocalizationHelper.swift12
1 files changed, 12 insertions, 0 deletions
diff --git a/WireGuard/WireGuard/LocalizationHelper.swift b/WireGuard/WireGuard/LocalizationHelper.swift
new file mode 100644
index 0000000..ea4cc64
--- /dev/null
+++ b/WireGuard/WireGuard/LocalizationHelper.swift
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: MIT
+// Copyright © 2018 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)
+}